summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schiffbauer <mschiff@gentoo.org>2023-09-05 00:31:28 +0200
committerMarc Schiffbauer <mschiff@gentoo.org>2023-09-05 00:31:28 +0200
commitb34f26a768d3fb88053d9c165dfb8050f82dfa36 (patch)
tree1e5d13ce019f264c6b3a50a97a9549501fd8d163 /app-backup/bareos/files/bareos-sd.initd
parentapp-editors/logseq-desktop-bin: add 0.9.15, drop 0.9.14 (diff)
downloadmschiff-b34f26a768d3fb88053d9c165dfb8050f82dfa36.tar.gz
mschiff-b34f26a768d3fb88053d9c165dfb8050f82dfa36.tar.bz2
mschiff-b34f26a768d3fb88053d9c165dfb8050f82dfa36.zip
app-backup/bareos: restore older version
Signed-off-by: Marc Schiffbauer <mschiff@gentoo.org>
Diffstat (limited to 'app-backup/bareos/files/bareos-sd.initd')
-rw-r--r--app-backup/bareos/files/bareos-sd.initd24
1 files changed, 24 insertions, 0 deletions
diff --git a/app-backup/bareos/files/bareos-sd.initd b/app-backup/bareos/files/bareos-sd.initd
new file mode 100644
index 0000000..a4a4534
--- /dev/null
+++ b/app-backup/bareos/files/bareos-sd.initd
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use dns
+}
+
+start_pre() {
+ checkpath --directory --owner root:bareos --mode 01775 /run/bareos
+ if [[ -e /run/bareos/bareos-sd.9103.pid && $(stat -c %U /run/bareos/bareos-sd.9103.pid) != "root" ]]; then
+ eerror "SECURITY ALERT: bareos owned pidfile found! (see #631598)"
+ exit 1
+ fi
+}
+
+start_post() {
+ ewaitfile 10 /run/bareos/bareos-sd.9103.pid
+ checkpath --file --owner root:bareos /run/bareos/bareos-sd.9103.pid
+}
+
+command="/usr/sbin/bareos-sd"
+command_args="${SD_OPTIONS}"
+pidfile="/run/bareos/bareos-sd.9103.pid"