17 lines
345 B
Bash
Executable file
17 lines
345 B
Bash
Executable file
#!/bin/bash -eux
|
|
|
|
source /etc/environment
|
|
|
|
from=$1
|
|
domain=$2
|
|
|
|
ssh core@$from sudo /data/indiehosters/utils/stop_before_migration.sh $domain $IP
|
|
|
|
mkdir /data/domains/$domain
|
|
scp core@${from}:${domain}.tgz /data/domains/$domain
|
|
cd /data/domains/$domain
|
|
tar xvzf ${domain}.tgz
|
|
rm ${domain}.tgz
|
|
|
|
systemctl start u@$domain
|
|
systemctl enable u@$domain
|