Skip to content
Snippets Groups Projects
Commit 634bb91c authored by Pierre Ozoux's avatar Pierre Ozoux Committed by GitHub
Browse files

new migrate way

parent 6e6536fe
No related branches found
No related tags found
No related merge requests found
#!/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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment