tRework OpenRC initscripts so they are symlinkable. - geomyidae - A small C-based gopherd. (gopher://bitreich.org/1/scm/geomyidae)
git clone git://r-36.net/geomyidae
Log
Files
Refs
README
LICENSE
---
commit b4cc2ac78ab2c2adfb2c9f5d484a85d6a62b24b4
parent 6fcf2a6aff1c5c4cdf4ce029209b7bf624fbcd72
Author: parazyd 
Date:   Sun, 14 Jul 2019 14:56:04 +0200

Rework OpenRC initscripts so they are symlinkable.

Signed-off-by: Christoph Lohmann <20h@r-36.net>

Diffstat:
  rc.d/Gentoo.conf.d                  |       3 +--
  rc.d/Gentoo.init.d                  |      20 ++++++--------------

2 files changed, 7 insertions(+), 16 deletions(-)
---
diff --git a/rc.d/Gentoo.conf.d b/rc.d/Gentoo.conf.d
t@@ -1,5 +1,4 @@
 #
 # Parameters to be passed to geomyidae
 #
-GEOMYIDAE_ARGS="-d -u gopherd -g gopherd -b /var/gopher -o 70 -l /var/log/geomyidae.log -h localhost"
-
+GEOMYIDAE_ARGS="-d -u gopherd -g gopherd -b /var/gopher -o 70 -l /var/log/${RC_SVCNAME}.log -h localhost"
diff --git a/rc.d/Gentoo.init.d b/rc.d/Gentoo.init.d
t@@ -1,17 +1,9 @@
 #!/sbin/openrc-run
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: $
 
-start(){
-    ebegin "Starting geomyidae"
-    [ -n "$GEOMYIDAE_ARGS" ] && GEOMYIDAE_ARGS="-- $GEOMYIDAE_ARGS"
-    start-stop-daemon -Sbm -p /run/geomyidae.pid -x /usr/sbin/geomyidae $GEOMYIDAE_ARGS
-    eend $? "Failed to start geomyidae"
-}
-
-stop(){
-    ebegin "Stopping geomyidae"
-    start-stop-daemon -K -p /var/run/geomyidae.pid
-    eend $? "Failed to stop geomyidae"
-}
+name="${RC_SVCNAME}"
+command="/usr/bin/geomyidae"
+pidfile="/run/${RC_SVCNAME}.pid"
+command_args="${GEOMYIDAE_ARGS}"
+command_background="yes"