Commit 634bb91c authored by Pierre Ozoux's avatar Pierre Ozoux Committed by GitHub

new migrate way

parent 6e6536fe
#!/bin/bash -eux
#!/bin/bash -eux
source /etc/environment
from=$1
hash=$1
domain=$2
ssh core@$from sudo /data/indiehosters/utils/stop_before_migration.sh $domain $IP
cd /data/domains/
wget https://wader.indie.host/migrate/$hash
unzip $hash
rm $hash
cd $domain
mkdir /data/domains/$domain
scp core@${from}:${domain}.tgz /data/domains/$domain
cd /data/domains/$domain
tar xvzf ${domain}.tgz
rm ${domain}.tgz
cp TLS/$domain.pem /system/haproxy/haproxy/certs
systemctl start u@$domain
systemctl enable u@$domain
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment