Installationsscript praxistauglicher gemacht

This commit is contained in:
Florian Schlegel 2020-08-16 11:37:37 +02:00
parent 62c320252c
commit e0eb5a6cd5
1 changed files with 10 additions and 4 deletions

View File

@ -1,8 +1,14 @@
#!/bin/bash
sudo cp /home/livecam/LiveCam/systemd/livecam-chch.service /etc/systemd/system/livecam-chch.service
sudo chmod 664 /etc/systemd/system/livecam-chch.service
# service enablen - startet so automatisch
sudo systemctl enable livecam-chch
if [ "$(id -u)" -ne 0 ]; then
exec sudo /bin/bash "$0" "$@"
fi
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cp $SCRIPT_DIR/livecam-chch.service /etc/systemd/system/livecam-chch.service
chmod 664 /etc/systemd/system/livecam-chch.service
systemctl daemon-reload
# enable and start service
systemctl enable livecam-chch
systemctl start livecam-chch