Difference between revisions of "Znc"

From ArchWiki
Jump to: navigation, search
m (Init script)
Line 2: Line 2:
 
'''ZNC''' is an advanced IRC bouncer that is left connected so an IRC client can disconnect/reconnect without loosing the chat session.
 
'''ZNC''' is an advanced IRC bouncer that is left connected so an IRC client can disconnect/reconnect without loosing the chat session.
  
== Init script ==
+
== Installation ==
 +
1. Install {{pkg|znc}} from the [[Official Repositories]]. The installation script will create a group and user '''znc'''. The default home directory for this user is {{ic|/var/lib/znc}}.
  
By default, ZNC does not include an daemon init script (like those usually found in {{ic|/etc/rc.d/}}). It maybe preferable to run ZNC as a daemon:
+
{{Note: A bug in znc.install (znc 1.0-2) sets the znc user's home directory as {{ic|/var/empty}}. {{ic|/var/lib/znc}} is still created and owned by the correct user/group. You should change znc's home directory to {{ic|/var/lib/znc}}}}
  
1. Install {{pkg|znc}} from the [[Official Repositories]].
+
2. Generate ZNC config as user '''znc'''.
 +
# su - znc
 +
$ znc --makeconf
 +
Go through the wizard and setup your preferences.
  
2. Create a znc group and user
+
3. To make ZNC start on boot:
 +
# systemctl enable znc
  
groupadd -r znc
+
Start and stop the ZNC daemon as usual by running:
useradd -r -g znc -d /var/lib/znc -s /bin/false -c znc znc
+
mkdir -p /var/lib/znc
+
chown znc:znc /var/lib/znc
+
  
{{Out of date|Arch Linux has moved to systemd, so rc.conf is no longer used.}}
+
# systemctl {start|stop|restart} znc
3. Install rc.d and conf.d script:
+
 
+
wget -O /etc/rc.d/znc https://raw.github.com/kylef/ark/master/znc-system-wide/znc.rcd
+
chmod a+x /etc/rc.d/znc
+
wget -O /etc/conf.d/znc https://raw.github.com/kylef/ark/master/znc-system-wide/znc.conf
+
 
+
4. Generate ZNC config:
+
 
+
rc.d makeconf znc
+
 
+
To make ZNC start on boot, add ZNC to <code>DAEMONS</code> in <code>/etc/rc.conf</code>.
+
 
+
Start and stop the ZNC daemon as usual by running:
+
  
rc.d {start|stop|restart} znc
+
== See also ==
 +
* [http://wiki.znc.in/ZNC ZNC's website]
  
 
== See also ==
 
== See also ==
  
 
* [http://wiki.znc.in/ZNC ZNC's website]
 
* [http://wiki.znc.in/ZNC ZNC's website]

Revision as of 02:04, 23 December 2012

ZNC is an advanced IRC bouncer that is left connected so an IRC client can disconnect/reconnect without loosing the chat session.

Installation

1. Install znc from the Official Repositories. The installation script will create a group and user znc. The default home directory for this user is /var/lib/znc.

{{Note: A bug in znc.install (znc 1.0-2) sets the znc user's home directory as /var/empty. /var/lib/znc is still created and owned by the correct user/group. You should change znc's home directory to /var/lib/znc}}

2. Generate ZNC config as user znc.

# su - znc
$ znc --makeconf

Go through the wizard and setup your preferences.

3. To make ZNC start on boot:

# systemctl enable znc

Start and stop the ZNC daemon as usual by running:

# systemctl {start|stop|restart} znc

See also

See also