diff options
author | Alexey Sokolov <sokolov@google.com> | 2017-01-04 01:58:29 +0100 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2017-01-04 02:01:18 +0100 |
commit | 08352091a142a547d7aaf9a52609395634489a86 (patch) | |
tree | 751976165b7526ea1245d50de71446d22ad2c587 /net-irc/znc/files | |
parent | d4610beae1e0e8b250567ba3200c009ad102edbd (diff) | |
download | gentoo-08352091a142a547d7aaf9a52609395634489a86.tar.gz gentoo-08352091a142a547d7aaf9a52609395634489a86.tar.xz |
net-irc/znc: Update/rewrite live ebuild
Closes: https://github.com/gentoo/gentoo/pull/3236
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'net-irc/znc/files')
-rw-r--r-- | net-irc/znc/files/README.gentoo-r1 | 15 | ||||
-rw-r--r-- | net-irc/znc/files/znc.initd-r2 | 41 |
2 files changed, 56 insertions, 0 deletions
diff --git a/net-irc/znc/files/README.gentoo-r1 b/net-irc/znc/files/README.gentoo-r1 new file mode 100644 index 00000000000..cbd565d3d96 --- /dev/null +++ b/net-irc/znc/files/README.gentoo-r1 @@ -0,0 +1,15 @@ +To run znc as a user, run 'znc --makeconf' to create a configuration file. + +To configure the system-wide daemon, you may run 'emerge --config znc'. + +If migrating from a user-based install, you can copy the existing +configuration files: + + # mkdir /var/lib/znc + # mv /home/$USER/.znc/* /var/lib/znc + # rm -rf /home/$USER/.znc + # chown -R znc:znc /var/lib/znc + +OpenRC user may also adjust the location of the files and the user running +znc in /etc/conf.d/znc instead. Systemd user may have to overwrite +existing unit file. diff --git a/net-irc/znc/files/znc.initd-r2 b/net-irc/znc/files/znc.initd-r2 new file mode 100644 index 00000000000..13bfcdfd0d9 --- /dev/null +++ b/net-irc/znc/files/znc.initd-r2 @@ -0,0 +1,41 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_commands="config" +extra_started_commands="reload save" +command="/usr/bin/znc" +command_args="--datadir \"${ZNC_DATADIR}\" --foreground" +command_background="yes" +pidfile="${ZNC_PIDFILE:-/run/znc/znc.pid}" +user=${ZNC_USER:-znc} +group=${ZNC_GROUP:-znc} +start_stop_daemon_args="--chdir \"${ZNC_DATADIR}\" --user ${user} --group ${group} ${ZNC_SSDARGS}" +retry="${ZNC_TERMTIMEOUT}" + +required_dirs="${ZNC_DATADIR}" + +depend() { + use dns logger +} + +start_pre() { + checkpath -d -m 0770 -o ${user}:${group} "$(dirname ${pidfile})" +} + +stop_post() { + rm -f "${pidfile}" +} + +reload() { + ebegin "Reloading ZNC Configuration File from Disk" + start-stop-daemon --signal SIGHUP --pidfile "${pidfile}" + eend $? +} + +save() { + ebegin "Saving ZNC Configuration File to Disk" + start-stop-daemon --signal SIGUSR1 --pidfile "${pidfile}" + eend $? +} |