15 lines
381 B
Bash
Executable File
15 lines
381 B
Bash
Executable File
#!/bin/bash
|
|
|
|
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
|