diff options
author | wg <wg@FreeBSD.org> | 2013-06-27 20:36:31 +0800 |
---|---|---|
committer | wg <wg@FreeBSD.org> | 2013-06-27 20:36:31 +0800 |
commit | 48c81026f7ae4e60dc54bc7ce2ee2d3547d3dab5 (patch) | |
tree | 012dd0e90ae9d986d5826cde3affaa2924a578c9 /irc | |
parent | bff6541a7bb9aca53beb997ce36a3b8aa5956bbe (diff) | |
download | freebsd-ports-gnome-48c81026f7ae4e60dc54bc7ce2ee2d3547d3dab5.tar.gz freebsd-ports-gnome-48c81026f7ae4e60dc54bc7ce2ee2d3547d3dab5.tar.zst freebsd-ports-gnome-48c81026f7ae4e60dc54bc7ce2ee2d3547d3dab5.zip |
irc/znc: add rc.d script
- Add rc.d script
PR: ports/179190
Approved by: maintainer (timeout)
Diffstat (limited to 'irc')
-rw-r--r-- | irc/znc/Makefile | 1 | ||||
-rw-r--r-- | irc/znc/files/znc.in | 36 |
2 files changed, 37 insertions, 0 deletions
diff --git a/irc/znc/Makefile b/irc/znc/Makefile index eff728ca0366..067251a66052 100644 --- a/irc/znc/Makefile +++ b/irc/znc/Makefile @@ -14,6 +14,7 @@ LICENSE= GPLv2 FETCH_ARGS= -Fpr GNU_CONFIGURE= yes +USE_RC_SUBR= znc USES= pkgconfig iconv USE_GMAKE= yes WANT_PERL= yes diff --git a/irc/znc/files/znc.in b/irc/znc/files/znc.in new file mode 100644 index 000000000000..93b16b316421 --- /dev/null +++ b/irc/znc/files/znc.in @@ -0,0 +1,36 @@ +#!/bin/sh +# +# PROVIDE: znc +# REQUIRE: LOGIN DAEMON +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable znc: +# +# znc_enable: Set to NO by default. Set it to YES to enable it. +# znc_conf_dir: Directory where znc configuration +# data is stored. +# Default: %%PREFIX%%/etc/znc +# znc_user: The user account znc runs as what +# you want it to be. It uses 'znc' user by +# default. Do not sets it as empty or it will run +# as root. +# + +. /etc/rc.subr + +name=znc +rcvar=${name}_enable + +command=%%PREFIX%%/bin/znc + +load_rc_config ${name} + +: ${znc_enable:="NO"} +: ${znc_user:="znc"} +: ${znc_conf_dir="%%PREFIX%%/etc/znc"} + +znc_flags=" \ + ${znc_conf_dir:+-d ${znc_conf_dir}} \ + ${znc_flags}" + +run_rc_command "$1" |