summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2016-11-26 14:49:09 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2016-11-26 14:49:18 +0000
commit3ba4e746c3e6ec10fbb8df1b385b4e9ca85978df (patch)
tree0930d3fb2ea13cbc4c2b0af0a7d8806df2ed028d /mail-mta/nullmailer/files
parentmedia-sound/ams: Specify moc binary paths in econf call (diff)
downloadgentoo-3ba4e746c3e6ec10fbb8df1b385b4e9ca85978df.tar.gz
gentoo-3ba4e746c3e6ec10fbb8df1b385b4e9ca85978df.tar.bz2
gentoo-3ba4e746c3e6ec10fbb8df1b385b4e9ca85978df.zip
mail-mta/nullmailer: remove '+=' bashism from init.d script
Noticed as a sourcing failure on a system with 'sh' ->/bin/dash: dash: 9: /etc/init.d/nullmailer: start_stop_daemon_args+= --stdout /var/log/nullmailer/nullmailer.log: not found dash: 10: /etc/init.d/nullmailer: start_stop_daemon_args+= --stderr /var/log/nullmailer/nullmailer.log: not found Package-Manager: portage-2.3.2
Diffstat (limited to 'mail-mta/nullmailer/files')
-rw-r--r--mail-mta/nullmailer/files/init.d-nullmailer-r652
1 files changed, 52 insertions, 0 deletions
diff --git a/mail-mta/nullmailer/files/init.d-nullmailer-r6 b/mail-mta/nullmailer/files/init.d-nullmailer-r6
new file mode 100644
index 000000000000..389329e10f6c
--- /dev/null
+++ b/mail-mta/nullmailer/files/init.d-nullmailer-r6
@@ -0,0 +1,52 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+command="/usr/sbin/nullmailer-send"
+
+start_stop_daemon_args="--chdir /var/spool/nullmailer --user nullmail:nullmail"
+start_stop_daemon_args="${start_stop_daemon_args} --stdout /var/log/nullmailer/nullmailer.log"
+start_stop_daemon_args="${start_stop_daemon_args} --stderr /var/log/nullmailer/nullmailer.log"
+
+required_dirs="/var/spool/nullmailer /var/log/nullmailer"
+pidfile="/run/nullmailer.pid"
+command_background="true"
+
+depend() {
+ use net logger
+}
+
+checkconfig() {
+ local error=0
+ local f=/etc/nullmailer/me
+ if [ ! -s ${f} ]; then
+ eerror "${f} does not exist"
+ error=1
+ fi
+ f=/etc/nullmailer/defaultdomain
+ if [ ! -s ${f} ]; then
+ eerror "${f} does not exist"
+ error=1
+ fi
+ if [ ${error} -eq 1 ]; then
+ einfo "You need to run 'emerge --config nullmailer'!"
+ fi
+ if [ -e /service/nullmailer ]; then
+ eerror "Nullmailer is already running under svscan!"
+ error=2
+ fi
+ if [ ${error} -ne 0 ]; then
+ return 1
+ else
+ return 0
+ fi
+}
+
+start_pre() {
+ checkconfig
+}
+
+stop_pre() {
+ checkconfig # to avoid init.d stopping svscan instance
+}