Added debian bin folder.
This commit is contained in:
parent
21098eb861
commit
0bb08b3f8d
14
.gitignore
vendored
14
.gitignore
vendored
|
@ -249,14 +249,14 @@ pip-log.txt
|
||||||
#########################
|
#########################
|
||||||
|
|
||||||
# Artifacts for debian-x64
|
# Artifacts for debian-x64
|
||||||
deployment/debian-x64/pkg-src/.debhelper/
|
deployment/debian-package-x64/pkg-src/.debhelper/
|
||||||
deployment/debian-x64/pkg-src/*.debhelper
|
deployment/debian-package-x64/pkg-src/*.debhelper
|
||||||
deployment/debian-x64/pkg-src/debhelper-build-stamp
|
deployment/debian-package-x64/pkg-src/debhelper-build-stamp
|
||||||
deployment/debian-x64/pkg-src/files
|
deployment/debian-package-x64/pkg-src/files
|
||||||
deployment/debian-x64/pkg-src/jellyfin.substvars
|
deployment/debian-package-x64/pkg-src/jellyfin.substvars
|
||||||
deployment/debian-x64/pkg-src/jellyfin/
|
deployment/debian-package-x64/pkg-src/jellyfin/
|
||||||
# Don't ignore the debian/bin folder
|
# Don't ignore the debian/bin folder
|
||||||
!deployment/debian-x64/pkg-src/bin/
|
!deployment/debian-package-x64/pkg-src/bin/
|
||||||
|
|
||||||
deployment/**/dist/
|
deployment/**/dist/
|
||||||
deployment/**/pkg-dist/
|
deployment/**/pkg-dist/
|
||||||
|
|
37
deployment/debian-package-x64/pkg-src/bin/jellyfin-sudoers
Normal file
37
deployment/debian-package-x64/pkg-src/bin/jellyfin-sudoers
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
#Allow jellyfin group to start, stop and restart itself
|
||||||
|
Cmnd_Alias RESTARTSERVER_SYSV = /sbin/service jellyfin restart, /usr/sbin/service jellyfin restart
|
||||||
|
Cmnd_Alias STARTSERVER_SYSV = /sbin/service jellyfin start, /usr/sbin/service jellyfin start
|
||||||
|
Cmnd_Alias STOPSERVER_SYSV = /sbin/service jellyfin stop, /usr/sbin/service jellyfin stop
|
||||||
|
Cmnd_Alias RESTARTSERVER_SYSTEMD = /usr/bin/systemctl restart jellyfin, /bin/systemctl restart jellyfin
|
||||||
|
Cmnd_Alias STARTSERVER_SYSTEMD = /usr/bin/systemctl start jellyfin, /bin/systemctl start jellyfin
|
||||||
|
Cmnd_Alias STOPSERVER_SYSTEMD = /usr/bin/systemctl stop jellyfin, /bin/systemctl stop jellyfin
|
||||||
|
Cmnd_Alias RESTARTSERVER_INITD = /etc/init.d/jellyfin restart
|
||||||
|
Cmnd_Alias STARTSERVER_INITD = /etc/init.d/jellyfin start
|
||||||
|
Cmnd_Alias STOPSERVER_INITD = /etc/init.d/jellyfin stop
|
||||||
|
|
||||||
|
|
||||||
|
%jellyfin ALL=(ALL) NOPASSWD: RESTARTSERVER_SYSV
|
||||||
|
%jellyfin ALL=(ALL) NOPASSWD: STARTSERVER_SYSV
|
||||||
|
%jellyfin ALL=(ALL) NOPASSWD: STOPSERVER_SYSV
|
||||||
|
%jellyfin ALL=(ALL) NOPASSWD: RESTARTSERVER_SYSTEMD
|
||||||
|
%jellyfin ALL=(ALL) NOPASSWD: STARTSERVER_SYSTEMD
|
||||||
|
%jellyfin ALL=(ALL) NOPASSWD: STOPSERVER_SYSTEMD
|
||||||
|
%jellyfin ALL=(ALL) NOPASSWD: RESTARTSERVER_INITD
|
||||||
|
%jellyfin ALL=(ALL) NOPASSWD: STARTSERVER_INITD
|
||||||
|
%jellyfin ALL=(ALL) NOPASSWD: STOPSERVER_INITD
|
||||||
|
|
||||||
|
Defaults!RESTARTSERVER_SYSV !requiretty
|
||||||
|
Defaults!STARTSERVER_SYSV !requiretty
|
||||||
|
Defaults!STOPSERVER_SYSV !requiretty
|
||||||
|
Defaults!RESTARTSERVER_SYSTEMD !requiretty
|
||||||
|
Defaults!STARTSERVER_SYSTEMD !requiretty
|
||||||
|
Defaults!STOPSERVER_SYSTEMD !requiretty
|
||||||
|
Defaults!RESTARTSERVER_INITD !requiretty
|
||||||
|
Defaults!STARTSERVER_INITD !requiretty
|
||||||
|
Defaults!STOPSERVER_INITD !requiretty
|
||||||
|
|
||||||
|
#Allow the server to mount iso images
|
||||||
|
%jellyfin ALL=(ALL) NOPASSWD: /bin/mount
|
||||||
|
%jellyfin ALL=(ALL) NOPASSWD: /bin/umount
|
||||||
|
|
||||||
|
Defaults:%jellyfin !requiretty
|
18
deployment/debian-package-x64/pkg-src/bin/restart.sh
Normal file
18
deployment/debian-package-x64/pkg-src/bin/restart.sh
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
NAME=jellyfin
|
||||||
|
|
||||||
|
restart_cmds=("s6-svc -t /var/run/s6/services/${NAME}" \
|
||||||
|
"systemctl restart ${NAME}" \
|
||||||
|
"service ${NAME} restart" \
|
||||||
|
"/etc/init.d/${NAME} restart")
|
||||||
|
|
||||||
|
for restart_cmd in "${restart_cmds[@]}"; do
|
||||||
|
cmd=$(echo "$restart_cmd" | awk '{print $1}')
|
||||||
|
cmd_loc=$(command -v ${cmd})
|
||||||
|
if [[ -n "$cmd_loc" ]]; then
|
||||||
|
restart_cmd=$(echo "$restart_cmd" | sed -e "s%${cmd}%${cmd_loc}%")
|
||||||
|
echo "sleep 2; sudo $restart_cmd > /dev/null 2>&1" | at now > /dev/null 2>&1
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user