Created
September 19, 2018 21:32
-
-
Save begriffs/93b20e19bef89475b52aaaf87e866c6c to your computer and use it in GitHub Desktop.
Making ZNC work with a dedicated user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: infrastructure/db/user.list | |
=================================================================== | |
RCS file: /cvs/ports/infrastructure/db/user.list,v | |
retrieving revision 1.318 | |
diff -u -p -r1.318 user.list | |
--- infrastructure/db/user.list 15 Jun 2018 09:29:03 -0000 1.318 | |
+++ infrastructure/db/user.list 7 Jul 2018 19:44:42 -0000 | |
@@ -321,3 +321,4 @@ id user group port options | |
810 _sabnzbd _sabnzbd news/sabnzbd | |
811 _openvpnusers net/openvpn_bsdauth | |
812 _mactelnet _mactelnet net/mac-telnet | |
+813 _znc _znc net/znc | |
Index: net/znc/pkg/PLIST | |
=================================================================== | |
RCS file: /cvs/ports/net/znc/pkg/PLIST,v | |
retrieving revision 1.14 | |
diff -u -p -r1.14 PLIST | |
--- net/znc/pkg/PLIST 16 May 2018 06:40:51 -0000 1.14 | |
+++ net/znc/pkg/PLIST 7 Jul 2018 19:44:57 -0000 | |
@@ -1,4 +1,7 @@ | |
@comment $OpenBSD: PLIST,v 1.14 2018/05/16 06:40:51 ajacoutot Exp $ | |
+@newgroup _znc:813 | |
+@newuser _znc:813:_znc:daemon:znc user:/nonexistent:/sbin/nologin | |
+@rcscript ${RCDIR}/znc.rc | |
@bin bin/znc | |
bin/znc-buildmod | |
include/znc/ | |
Index: net/znc/pkg/znc.rc | |
=================================================================== | |
RCS file: net/znc/pkg/znc.rc | |
diff -N net/znc/pkg/znc.rc | |
--- /dev/null 1 Jan 1970 00:00:00 -0000 | |
+++ net/znc/pkg/znc.rc 7 Jul 2018 19:44:57 -0000 | |
@@ -0,0 +1,10 @@ | |
+#!/bin/ksh | |
+# | |
+# $OpenBSD: rc.template,v 1.12 2018/01/11 19:30:18 rpe Exp $ | |
+ | |
+daemon="${TRUEPREFIX}/bin/znc" | |
+daemon_user="_znc" | |
+ | |
+. /etc/rc.d/rc.subr | |
+ | |
+rc_cmd $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment