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 | |
parent | net-misc/socat: ia64 stable, bug #615180 (diff) | |
download | gentoo-01c9e9d631a356d7da00cae6062b66c0cb805023.tar.gz gentoo-01c9e9d631a356d7da00cae6062b66c0cb805023.tar.bz2 gentoo-01c9e9d631a356d7da00cae6062b66c0cb805023.zip |
net-misc/gerbera: Fix init scripts
Fixes #621934
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'net-misc/gerbera')
-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 | ||||
-rw-r--r-- | net-misc/gerbera/gerbera-1.0.0-r1.ebuild (renamed from net-misc/gerbera/gerbera-1.0.0.ebuild) | 4 | ||||
-rw-r--r-- | net-misc/gerbera/gerbera-9999.ebuild | 4 |
5 files changed, 45 insertions, 32 deletions
diff --git a/net-misc/gerbera/files/gerbera-1.0.0.confd b/net-misc/gerbera/files/gerbera-1.0.0.confd index 7f5c00830251..4c4a44220351 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 86111395d7d1..faee5e3c56cc 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 000000000000..fcc9b5de4908 --- /dev/null +++ b/net-misc/gerbera/files/gerbera.tmpfiles @@ -0,0 +1 @@ +d /run/gerbera 0755 gerbera gerbera -
\ No newline at end of file diff --git a/net-misc/gerbera/gerbera-1.0.0.ebuild b/net-misc/gerbera/gerbera-1.0.0-r1.ebuild index 6b6892239b65..6202d227a4d6 100644 --- a/net-misc/gerbera/gerbera-1.0.0.ebuild +++ b/net-misc/gerbera/gerbera-1.0.0-r1.ebuild @@ -3,7 +3,7 @@ EAPI=6 -inherit cmake-utils eutils linux-info systemd user +inherit cmake-utils eutils linux-info systemd tmpfiles user if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://github.com/v00d00/${PN}.git" @@ -88,6 +88,8 @@ src_install() { keepdir /var/lib/${PN} fowners ${PN}:${PN} /var/lib/${PN} + + newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf } pkg_postinst() { diff --git a/net-misc/gerbera/gerbera-9999.ebuild b/net-misc/gerbera/gerbera-9999.ebuild index 6b6892239b65..6202d227a4d6 100644 --- a/net-misc/gerbera/gerbera-9999.ebuild +++ b/net-misc/gerbera/gerbera-9999.ebuild @@ -3,7 +3,7 @@ EAPI=6 -inherit cmake-utils eutils linux-info systemd user +inherit cmake-utils eutils linux-info systemd tmpfiles user if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://github.com/v00d00/${PN}.git" @@ -88,6 +88,8 @@ src_install() { keepdir /var/lib/${PN} fowners ${PN}:${PN} /var/lib/${PN} + + newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf } pkg_postinst() { |