use a temporary directory for nginx configuration

This commit is contained in:
Daniel Micay 2021-11-25 20:33:45 -05:00
parent 43c8ac3c45
commit 8b4e119821
3 changed files with 6 additions and 5 deletions

View file

@ -24,8 +24,8 @@ ssh $remote sync -f $target
ssh $remote ln -snf $target /srv/element.grapheneos.org
ssh $remote sync /srv/element.grapheneos.org
sed -i "s|/srv/element.grapheneos.org|$target|" nginx.conf.tmp
rsync -rpcv --chmod=D755,F644 --delete nginx.conf.tmp $remote:/etc/nginx/nginx.conf
sed -i "s|/srv/element.grapheneos.org|$target|" nginx-tmp/nginx.conf
rsync -rpcv --chmod=D755,F644 --delete nginx-tmp/nginx.conf $remote:/etc/nginx/nginx.conf
ssh $remote sync -f /etc/nginx/nginx.conf
ssh $remote nginx -s reload