From db6644d980f7428d29cc13d2bf98212edd7ccccc Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Thu, 11 Jun 2020 14:54:08 -0600 Subject: [PATCH] Automatically update installed scripts --- scripts/install-scripts.bash | 13 +++++++++++++ scripts/install.py | 1 + 2 files changed, 14 insertions(+) create mode 100755 scripts/install-scripts.bash diff --git a/scripts/install-scripts.bash b/scripts/install-scripts.bash new file mode 100755 index 0000000..0474625 --- /dev/null +++ b/scripts/install-scripts.bash @@ -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 diff --git a/scripts/install.py b/scripts/install.py index 67e55da..e18ba03 100755 --- a/scripts/install.py +++ b/scripts/install.py @@ -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)