Make sure bin and service are owned by root

This commit is contained in:
Jason Streifling 2024-08-23 20:34:13 +02:00
parent 7ef957c2d7
commit beec20cdda

View File

@ -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