diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-mail/mailgraph/files/mailgraph.initd-new |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-mail/mailgraph/files/mailgraph.initd-new')
-rw-r--r-- | net-mail/mailgraph/files/mailgraph.initd-new | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/net-mail/mailgraph/files/mailgraph.initd-new b/net-mail/mailgraph/files/mailgraph.initd-new new file mode 100644 index 000000000000..564f714e3dc4 --- /dev/null +++ b/net-mail/mailgraph/files/mailgraph.initd-new @@ -0,0 +1,35 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +start() { + ebegin "Starting mailgraph" + + # read mail log messages somewhere other than /var/log/syslog? + [[ -n "${MG_LOGFILE}" ]] && MG_DAEMON_OPTS="${MG_DAEMON_OPTS} -l ${MG_LOGFILE}" + + # create /var/run/mailgraph if necessary + if [ ! -d /var/run/mailgraph ] ; then + checkpath -q -d -o mgraph:adm -m 0775 /var/run/mailgraph || return 1 + fi + + UMASK=$(umask) + umask ${MG_DAEMON_UMASK:-0077} + start-stop-daemon --start \ + --name mailgraph \ + --user "${MG_DAEMON_UID}:${MG_DAEMON_GID}" \ + --name mailgraph \ + --pidfile ${MG_DAEMON_PID} \ + --exec /usr/bin/mailgraph -- -v --daemon \ + --daemon-log="${MG_DAEMON_LOG}" \ + --daemon-pid="${MG_DAEMON_PID}" \ + --daemon-rrd=/var/lib/mailgraph ${MG_DAEMON_OPTS} + eend $? + umask "${UMASK}" +} + +stop() { + ebegin "Shutting down mailgraph" + start-stop-daemon --stop --quiet --pidfile "${MG_DAEMON_PID}" + eend $? +} |