From beec20cddaf528451d831ffdd1a5895c7e9ddb4d Mon Sep 17 00:00:00 2001 From: Jason Streifling Date: Fri, 23 Aug 2024 20:34:13 +0200 Subject: [PATCH] Make sure bin and service are owned by root --- update.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/update.sh b/update.sh index 1ed62e8..e973328 100755 --- a/update.sh +++ b/update.sh @@ -35,8 +35,10 @@ go build -o $TMP_DIR/cpolis $CPOLIS_DIR/cmd/main.go echo -e 'Setting system files up' sudo mv $TMP_DIR/cpolis $BIN_DIR/cpolis +sudo chown root:root $BIN_DIR/cpolis chmod +x $BIN_DIR/cpolis -sudo mv $CPOLIS_DIR/cpolis.service /etc/systemd/system +sudo mv $CPOLIS_DIR/cpolis.service $SYSTEMD_DIR +sudo chown root:root $SYSTEMD_DIR/cpolis.service sudo systemctl daemon-reload sudo systemctl is-active --quiet cpolis.service && sudo systemctl restart cpolis.service