diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2014-06-01 12:58:29 +0200 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2014-06-01 12:58:29 +0200 |
commit | eeb5bfa0336564ec30efc493010d49e6cbc9d7f9 (patch) | |
tree | e00b4a40a3c59a767458e2f30bbfad23dd36708a /main/znc/znc.initd | |
parent | 25c43def458ffc067d589496590c9eb8db355d19 (diff) | |
download | aports-eeb5bfa0336564ec30efc493010d49e6cbc9d7f9.tar.bz2 aports-eeb5bfa0336564ec30efc493010d49e6cbc9d7f9.tar.xz |
main/znc: upgrade to 1.4 and add initd
Diffstat (limited to 'main/znc/znc.initd')
-rw-r--r-- | main/znc/znc.initd | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/main/znc/znc.initd b/main/znc/znc.initd new file mode 100644 index 0000000000..8b7c8bca5e --- /dev/null +++ b/main/znc/znc.initd @@ -0,0 +1,39 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-irc/znc/files/znc.initd,v 1.1 2012/11/21 18:11:31 wired Exp $ + +extra_commands="config" +extra_started_commands="reload save" + +depend() { + need net +} + +start() { + ebegin "Starting ZNC" + start-stop-daemon --start --user ${ZNC_USER} --name znc \ + --exec /usr/bin/znc -- -d ${ZNC_CONF} + eend $? +} + +stop() { + ebegin "Stopping ZNC" + start-stop-daemon --signal SIGINT --name znc \ + --exec /usr/bin/znc -- -d ${ZNC_CONF} + eend $? +} + +reload() { + ebegin "Reloading ZNC Configuration File from Disk" + start-stop-daemon --signal SIGHUP --name znc \ + --exec /usr/bin/znc -- -d ${ZNC_CONF} + eend $? +} + +save() { + ebegin "Saving ZNC Configuration File to Disk" + start-stop-daemon --signal SIGUSR1 --name znc \ + --exec /usr/bin/znc -- -d ${ZNC_CONF} + eend $? +} |