Automatically update installed scripts

This commit is contained in:
Radon Rosborough 2020-06-11 14:54:08 -06:00
parent db89ef25d9
commit db6644d980
2 changed files with 14 additions and 0 deletions

13
scripts/install-scripts.bash Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -e
set -o pipefail
cp scripts/riju.service /etc/systemd/system/riju.service
cp scripts/certbot-pre.bash /etc/letsencrypt/renewal-hooks/pre/riju
cp scripts/certbot-post.bash /etc/letsencrypt/renewal-hooks/post/riju
cp scripts/install.py /usr/bin/riju-install
chgrp deploy /usr/bin/riju-install
chmod u=rwxs,g=rx,o= /usr/bin/riju-install
systemctl daemon-reload

View File

@ -39,5 +39,6 @@ with tempfile.TemporaryDirectory() as tmpdir:
)
os.chdir("riju")
subprocess.run(["make", "image-prod"], check=True)
subprocess.run(["scripts/install-scripts.bash"], check=True)
subprocess.run(["docker", "system", "prune", "-f"], check=True)
subprocess.run(["systemctl", "restart", "riju"], check=True)