summaryrefslogtreecommitdiffstats
path: root/gentoo_initscript
diff options
context:
space:
mode:
Diffstat (limited to 'gentoo_initscript')
-rw-r--r--gentoo_initscript25
1 files changed, 25 insertions, 0 deletions
diff --git a/gentoo_initscript b/gentoo_initscript
new file mode 100644
index 0000000..abb87d9
--- /dev/null
+++ b/gentoo_initscript
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+ use dns
+}
+
+start() {
+ ebegin "Starting pica-node"
+ # Ensure that we run from a readable working dir, and that we do not
+ # lock filesystems when being run from such a location.
+ cd /
+ start-stop-daemon --start --quiet --background --make-pidfile \
+ --pidfile /var/run/pica-node.pid --exec /usr/bin/pica-node \
+ --stdout /var/log/pica-node.log --stderr /var/log/pica-node.err \
+ --user ${PICANODE_USER:-pica-node} -- \
+ ${PICANODE_OPTS:--v}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping pica-node"
+ start-stop-daemon --stop --quiet --pidfile /var/run/pica-node.pid
+ eend $?
+}