diff options
author | Ian Whyman <thev00d00@gentoo.org> | 2017-09-05 20:17:09 +0100 |
---|---|---|
committer | Ian Whyman <thev00d00@gentoo.org> | 2017-09-05 20:17:17 +0100 |
commit | 3029c1b6974af21316360650904e8713ad04f39d (patch) | |
tree | 8b395ae787784b48226107d04d02d857e4b9da2e /net-misc/gerbera/files | |
parent | app-dicts/myspell-ru: Dropped version 20060316 (diff) | |
download | gentoo-3029c1b6974af21316360650904e8713ad04f39d.tar.gz gentoo-3029c1b6974af21316360650904e8713ad04f39d.tar.bz2 gentoo-3029c1b6974af21316360650904e8713ad04f39d.zip |
net-misc/gerbera: Fix up init script #629962
Thanks to Michael Orlitzky for the suggestions.
Package-Manager: Portage-2.3.8, Repoman-2.3.3
Diffstat (limited to 'net-misc/gerbera/files')
-rw-r--r-- | net-misc/gerbera/files/gerbera-1.0.0.confd | 13 | ||||
-rw-r--r-- | net-misc/gerbera/files/gerbera-1.0.0.initd | 45 | ||||
-rw-r--r-- | net-misc/gerbera/files/gerbera.tmpfiles | 1 |
3 files changed, 19 insertions, 40 deletions
diff --git a/net-misc/gerbera/files/gerbera-1.0.0.confd b/net-misc/gerbera/files/gerbera-1.0.0.confd index 4c4a44220351..3f4bdf16a75f 100644 --- a/net-misc/gerbera/files/gerbera-1.0.0.confd +++ b/net-misc/gerbera/files/gerbera-1.0.0.confd @@ -6,14 +6,6 @@ # NOTE: The minimum value allowed is 49152 GERBERA_PORT=49152 -# Run Gerbera as this user. -# NOTE: For security reasons do not run Gerbera as root. -GERBERA_USER="gerbera" - -# Run Gerbera as this group. -# NOTE: For security reasons do not run Gerbera as root. -GERBERA_GROUP="gerbera" - # Path to Gerbera config file. GERBERA_CONFIG="/etc/gerbera/config.xml" @@ -21,5 +13,8 @@ GERBERA_CONFIG="/etc/gerbera/config.xml" GERBERA_LOGFILE="/var/log/gerbera.log" # Other options you want to pass to Gerbera. -# Add "--interface ${GERBERA_INTERFACE}" to bind to a named interface. +# Add "--interface eth0" to bind to a named interface. GERBERA_OPTIONS="" + +# Uncomment if you are running Gerbera against a local MySQL +# rc_need="mysql" diff --git a/net-misc/gerbera/files/gerbera-1.0.0.initd b/net-misc/gerbera/files/gerbera-1.0.0.initd index faee5e3c56cc..758b0c8101e8 100644 --- a/net-misc/gerbera/files/gerbera-1.0.0.initd +++ b/net-misc/gerbera/files/gerbera-1.0.0.initd @@ -2,38 +2,23 @@ # Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 +command="/usr/bin/gerbera" +command_args="--logfile ${GERBERA_LOGFILE} + --config ${GERBERA_CONFIG} + --port ${GERBERA_PORT} + ${GERBERA_OPTIONS}" +command_user="gerbera:gerbera" +command_background=true +start_stop_daemon_args="--wait 500" +retry="10" +pidfile="/run/${RC_SVCNAME}.pid" + depend() { need net - # In order to properly support this (need vs use), we would have to - # parse ${GERBERA_CONFIG} and see if mysql is enabled and if it is - # pointing to the local system. #368409 - use mysql -} - -start() { - 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 Gerbera" - start-stop-daemon --stop --retry 10 --quiet --pidfile /run/gerbera/gerbera.pid - eend $? +start_pre() { + checkpath --owner "gerbera:gerbera" \ + --mode 0644 \ + --file "${GERBERA_LOGFILE}" } diff --git a/net-misc/gerbera/files/gerbera.tmpfiles b/net-misc/gerbera/files/gerbera.tmpfiles deleted file mode 100644 index fcc9b5de4908..000000000000 --- a/net-misc/gerbera/files/gerbera.tmpfiles +++ /dev/null @@ -1 +0,0 @@ -d /run/gerbera 0755 gerbera gerbera -
\ No newline at end of file |