diff options
author | Ian Whyman <thev00d00@gentoo.org> | 2017-06-17 17:33:47 +0100 |
---|---|---|
committer | Ian Whyman <thev00d00@gentoo.org> | 2017-06-17 17:34:03 +0100 |
commit | 01c9e9d631a356d7da00cae6062b66c0cb805023 (patch) | |
tree | c425b55167a87385d98d95c87a2bf1f66975f372 /net-misc/gerbera/files | |
parent | 5a80dc91ad8d01a73db21cc8a424d6f5c629921d (diff) | |
download | gentoo-01c9e9d631a356d7da00cae6062b66c0cb805023.tar.gz gentoo-01c9e9d631a356d7da00cae6062b66c0cb805023.tar.xz |
net-misc/gerbera: Fix init scripts
Fixes #621934
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'net-misc/gerbera/files')
-rw-r--r-- | net-misc/gerbera/files/gerbera-1.0.0.confd | 37 | ||||
-rw-r--r-- | net-misc/gerbera/files/gerbera-1.0.0.initd | 31 | ||||
-rw-r--r-- | net-misc/gerbera/files/gerbera.tmpfiles | 1 |
3 files changed, 39 insertions, 30 deletions
diff --git a/net-misc/gerbera/files/gerbera-1.0.0.confd b/net-misc/gerbera/files/gerbera-1.0.0.confd index 7f5c0083025..4c4a4422035 100644 --- a/net-misc/gerbera/files/gerbera-1.0.0.confd +++ b/net-misc/gerbera/files/gerbera-1.0.0.confd @@ -1,28 +1,25 @@ -# /etc/conf.d/mediatomb: config file for /etc/init.d/mediatomb +# /etc/conf.d/gerbera: config file for /etc/init.d/gerbera -# See the mediatomb(1) manpage for more info. +# See the gerbera(1) manpage for more info. -# MediaTomb Web UI port. +# Gerbera Web UI port. # NOTE: The minimum value allowed is 49152 -MEDIATOMB_PORT=49152 +GERBERA_PORT=49152 -# Run MediaTomb as this user. -# NOTE: For security reasons do not run MediaTomb as root. -MEDIATOMB_USER="mediatomb" +# Run Gerbera as this user. +# NOTE: For security reasons do not run Gerbera as root. +GERBERA_USER="gerbera" -# Run MediaTomb as this group. -# NOTE: For security reasons do not run MediaTomb as root. -MEDIATOMB_GROUP="mediatomb" +# Run Gerbera as this group. +# NOTE: For security reasons do not run Gerbera as root. +GERBERA_GROUP="gerbera" -# Path to MediaTomb config file. -MEDIATOMB_CONFIG="/etc/mediatomb/config.xml" +# Path to Gerbera config file. +GERBERA_CONFIG="/etc/gerbera/config.xml" -# Path to MediaTomb log file. -MEDIATOMB_LOGFILE="/var/log/mediatomb.log" +# Path to Gerbera log file. +GERBERA_LOGFILE="/var/log/gerbera.log" -# Path to MediaTomb pid file. -MEDIATOMB_PIDFILE="/var/run/mediatomb.pid" - -# Other options you want to pass to MediaTomb. -# Add "--interface ${MEDIATOMB_INTERFACE}" to bind to a named interface. -MEDIATOMB_OPTIONS="" +# Other options you want to pass to Gerbera. +# Add "--interface ${GERBERA_INTERFACE}" to bind to a named interface. +GERBERA_OPTIONS="" diff --git a/net-misc/gerbera/files/gerbera-1.0.0.initd b/net-misc/gerbera/files/gerbera-1.0.0.initd index 86111395d7d..faee5e3c56c 100644 --- a/net-misc/gerbera/files/gerbera-1.0.0.initd +++ b/net-misc/gerbera/files/gerbera-1.0.0.initd @@ -5,24 +5,35 @@ depend() { need net # In order to properly support this (need vs use), we would have to - # parse ${MEDIATOMB_CONFIG} and see if mysql is enabled and if it is + # parse ${GERBERA_CONFIG} and see if mysql is enabled and if it is # pointing to the local system. #368409 use mysql } start() { - ebegin "Starting MediaTomb" - start-stop-daemon --start --quiet --exec /usr/bin/mediatomb \ - --pidfile ${MEDIATOMB_PIDFILE} -- --daemon \ - --pidfile ${MEDIATOMB_PIDFILE} --user ${MEDIATOMB_USER} \ - --group ${MEDIATOMB_GROUP} --logfile ${MEDIATOMB_LOGFILE} \ - --config ${MEDIATOMB_CONFIG} --port ${MEDIATOMB_PORT} \ - ${MEDIATOMB_OPTIONS} + ebegin "Starting Gerbera" + + checkpath --directory --owner "${GERBERA_USER}:${GERBERA_GROUP}" --mode 0755 /run/gerbera + checkpath --file --owner "${GERBERA_USER}:${GERBERA_GROUP}" --mode 0644 "${GERBERA_LOGFILE}" + + start-stop-daemon \ + --start \ + --exec /usr/bin/gerbera \ + --user ${GERBERA_USER} \ + --group ${GERBERA_GROUP} \ + --background \ + --wait 500 \ + -- \ + --pidfile /run/gerbera/gerbera.pid \ + --logfile ${GERBERA_LOGFILE} \ + --config ${GERBERA_CONFIG} \ + --port ${GERBERA_PORT} \ + ${GERBERA_OPTIONS} eend $? } stop () { - ebegin "Stopping MediaTomb" - start-stop-daemon --stop --retry 10 --quiet --pidfile ${MEDIATOMB_PIDFILE} + ebegin "Stopping Gerbera" + start-stop-daemon --stop --retry 10 --quiet --pidfile /run/gerbera/gerbera.pid eend $? } diff --git a/net-misc/gerbera/files/gerbera.tmpfiles b/net-misc/gerbera/files/gerbera.tmpfiles new file mode 100644 index 00000000000..fcc9b5de490 --- /dev/null +++ b/net-misc/gerbera/files/gerbera.tmpfiles @@ -0,0 +1 @@ +d /run/gerbera 0755 gerbera gerbera -
\ No newline at end of file |