Skip to content
Snippets Groups Projects
Commit a8803fb8 authored by Pierre Ozoux's avatar Pierre Ozoux
Browse files

use variables instead of hardcoded

parent ce302f07
No related branches found
No related tags found
No related merge requests found
#!/bin/bash -eux
domain=`pwd | cut -d/ -f 4`
domain=$1
ip=$2
cd /data/domains/$domain
./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"}'
etcdctl --peers 172.17.42.1:4001 set /services/web/$domain '{"ip":"'$ip'", "port":"443"}'
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