diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2022-03-24 18:42:43 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2022-03-24 18:52:04 -0400 |
| commit | 98a7073b3ad466cf83a57007cb9785ab057dddf9 (patch) | |
| tree | 5b57483da64cf74cf4f7a34aa5c6f8ba1d818a1e | |
| parent | 0028001a2a1a7b248bfd5cd1293fee12b49533c0 (diff) | |
combine ssh commands for deployment
| -rwxr-xr-x | deploy-static | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/deploy-static b/deploy-static index efc5ea5d..6b862874 100755 --- a/deploy-static +++ b/deploy-static @@ -24,18 +24,14 @@ for server in ${servers[@]}; do echo target is $target echo - ssh $remote rm -rf $target - ssh $remote cp -a $active $target + ssh $remote "rm -rf $target && cp -a $active $target" rsync -rptcv --chmod=D755,F644 --delete static-tmp/ $remote:$target - ssh $remote sync -f $target - ssh $remote ln -snf $target /srv/grapheneos.org - ssh $remote sync /srv/grapheneos.org + ssh $remote "sync -f $target && ln -snf $target /srv/grapheneos.org && sync /srv/grapheneos.org" sed "s|/srv/grapheneos.org|$target|" nginx-tmp/nginx.conf > nginx-tmp/nginx.conf.root rsync -rptcv --chmod=D755,F644 --delete nginx-tmp/nginx.conf.root $remote:/etc/nginx/nginx.conf rsync -rptcv --chmod=D755,F644 --delete nginx-tmp/snippets/ $remote:/etc/nginx/snippets - ssh $remote 'sync /etc/nginx/nginx.conf /etc/nginx/snippets/*' - ssh $remote nginx -s reload + ssh $remote "sync /etc/nginx/nginx.conf /etc/nginx/snippets/* && nginx -s reload" echo echo active is now $target |
