summaryrefslogtreecommitdiff
path: root/net-p2p/automatic/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-09-09 10:40:04 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-09-09 10:40:04 +0100
commitb426a5cef3f0ebe3389686a1c145a834d3a1e120 (patch)
treeeee77f741af6979f620416c573e5203eab81c9c3 /net-p2p/automatic/files
parent97b176c73aa78bd33234884388e3978f520161c3 (diff)
gentoo auto-resync : 09:09:2022 - 10:40:04
Diffstat (limited to 'net-p2p/automatic/files')
-rw-r--r--net-p2p/automatic/files/automatic-0.9.0-util_test-header.patch11
-rw-r--r--net-p2p/automatic/files/automatic.initd36
2 files changed, 21 insertions, 26 deletions
diff --git a/net-p2p/automatic/files/automatic-0.9.0-util_test-header.patch b/net-p2p/automatic/files/automatic-0.9.0-util_test-header.patch
new file mode 100644
index 000000000000..726140644d8c
--- /dev/null
+++ b/net-p2p/automatic/files/automatic-0.9.0-util_test-header.patch
@@ -0,0 +1,11 @@
+# https://github.com/1100101/Automatic/pull/20
+--- ../src/tests/utils_test.c.org 2022-08-21 11:39:01.502847479 +0300
++++ ../src/tests/utils_test.c 2022-08-21 11:39:18.455043931 +0300
+@@ -6,6 +6,7 @@
+ */
+
+
++#include <stdint.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <assert.h>
diff --git a/net-p2p/automatic/files/automatic.initd b/net-p2p/automatic/files/automatic.initd
index 4eaa1dc810cd..e299d52876aa 100644
--- a/net-p2p/automatic/files/automatic.initd
+++ b/net-p2p/automatic/files/automatic.initd
@@ -1,35 +1,19 @@
#!/sbin/openrc-run
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
-NAME=${SVCNAME##*.}
-if [ -n "${NAME}" -a "${SVCNAME}" != "automatic" ]; then
- PID="/run/automatic.${NAME}.pid"
- PNAME=$(echo ${RC_SVCNAME} | sed 's/\..*//g')
- CONF_DEFAULT="/etc/conf.d/automatic.${NAME}"
-else
- PID="/run/automatic.pid"
- PNAME=${RC_SVCNAME}
- CONF_DEFAULT="/etc/conf.d/automatic"
-fi
-CONF=${CONF:-${CONF_DEFAULT}}
-EXEC=${EXEC:-/usr/bin/automatic}
+command="/usr/bin/automatic"
+command_args="${OPTS} ${CONFIG}"
+description="RSS downloader"
+name="RSS downloader"
+user="${AUTOMATIC_USER:-automatic}"
+group="${AUTOMATIC_GROUP:-automatic}"
+pidfile="/run/${RC_SVCNAME}.pid"
depend() {
need net
}
-start() {
- ebegin "Starting automatic"
- start-stop-daemon --start --quiet --make-pidfile --pidfile ${PID} --exec ${EXEC} -- ${OPTS} ${CONFIG}
- eend $?
-}
-
start_post() {
- pgrep -n $(echo ${PNAME}) > ${PID}
-}
-
-stop() {
- ebegin "Stopping automatic"
- start-stop-daemon --stop --quiet --pidfile ${PID}
- rm -f ${PID}
- eend $?
+ pgrep -n "${RC_SVCNAME%%.*}" > "${pidfile}"
}