summaryrefslogtreecommitdiff
path: root/net-p2p/fms/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-07-12 08:41:54 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-07-12 08:41:54 +0100
commit4df3bf9762850b34cd1ead5c80374d1a0fc3362e (patch)
tree3080c5cb7ad17abcb63776a9f21c4947845546a6 /net-p2p/fms/files
parent814f4cf860e299a046b649eaee5463427984c09c (diff)
gentoo resync : 12.07.2021
Diffstat (limited to 'net-p2p/fms/files')
-rw-r--r--net-p2p/fms/files/fms37
-rw-r--r--net-p2p/fms/files/fms.initd11
2 files changed, 11 insertions, 37 deletions
diff --git a/net-p2p/fms/files/fms b/net-p2p/fms/files/fms
deleted file mode 100644
index d7f0453f1606..000000000000
--- a/net-p2p/fms/files/fms
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# Check for OpenRC/Baselayout 2 - see bug #270646
-is_openrc() {
- [ -f /lib/librc.so -o -f /etc/init.d/sysfs -o -f /lib/rc/version ]
-}
-
-start() {
- ebegin "Starting FMS"
- if is_openrc; then
- start-stop-daemon -S -u freenet:freenet -d /var/freenet/fms -b -x /usr/bin/fms
- eend $?
- else
- cd /var/freenet/fms
- su -s /bin/sh -c "fms --daemon" freenet
- eend $?
- fi
-}
-
-stop() {
- ebegin "Stopping FMS"
- if is_openrc; then
- start-stop-daemon -K -u freenet:freenet -d /var/freenet/fms /usr/bin/fms
- eend $?
- else
- pkill -u freenet -f "fms --daemon"
- eend 0
- fi
- if [[ $RC_CMD == "restart" ]]; then
- ebegin "Waiting a few seconds to be sure FMS is ready for restart"
- sleep 10
- #give fms time to stop and release the nntp port
- fi
-}
-
diff --git a/net-p2p/fms/files/fms.initd b/net-p2p/fms/files/fms.initd
new file mode 100644
index 000000000000..fb76b701c515
--- /dev/null
+++ b/net-p2p/fms/files/fms.initd
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile="/run/fms.pid"
+start_stop_daemon_args="--chdir /var/freenet/fms"
+
+command="/usr/bin/fms"
+command_background="true"
+command_group="freenet"
+command_user="freenet"