WIP
This commit is contained in:
parent
656cba3773
commit
ce302f0773
3 changed files with 35 additions and 0 deletions
5
scripts/useful_one_liners
Normal file
5
scripts/useful_one_liners
Normal file
|
@ -0,0 +1,5 @@
|
|||
for cert in `ls /data/runtime/haproxy/approved-certs/`;do echo $cert;openssl x509 -enddate -noout -in $cert | cut -d'=' -f2;done
|
||||
|
||||
cp /data/indiehosters/unit-files/* /etc/systemd/system && systemctl daemon-reload
|
||||
|
||||
systemctl list-units | grep failed
|
19
utils/import
Executable file
19
utils/import
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/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
|
||||
|
||||
/data/indiehosters/utils/append_crt_list.sh $domain
|
||||
|
||||
systemctl start u@$domain
|
||||
systemctl enable u@$domain
|
11
utils/stop_before_migration
Normal file
11
utils/stop_before_migration
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash -eux
|
||||
|
||||
domain=`pwd | cut -d/ -f 4`
|
||||
|
||||
./BACKUP
|
||||
|
||||
systemctl stop u@$domain
|
||||
systemctl disable u@$domain
|
||||
|
||||
tar cvzf /home/core/${domain}.tgz .
|
||||
etcdctl --peers 172.17.42.1:4001 set /services/web/$domain '{"ip":"5.9.101.242", "port":"80"}'
|
Loading…
Reference in a new issue