summarylogtreecommitdiffstats
path: root/inspircd.install
diff options
context:
space:
mode:
authorMaxime Poulin2015-11-30 22:57:04 -0500
committerMaxime Poulin2015-11-30 22:57:04 -0500
commitc781cf77ebd23b5992f17167cc6872f38558d907 (patch)
tree9d2d9627c1f1451a270c73e71b43c0b35020f22d /inspircd.install
downloadaur-c781cf77ebd23b5992f17167cc6872f38558d907.tar.gz
Port to AUR4 & update to latest version
Diffstat (limited to 'inspircd.install')
-rw-r--r--inspircd.install21
1 files changed, 21 insertions, 0 deletions
diff --git a/inspircd.install b/inspircd.install
new file mode 100644
index 000000000000..997f72dcd0e2
--- /dev/null
+++ b/inspircd.install
@@ -0,0 +1,21 @@
+create_user() {
+ getent group inspircd &>/dev/null || groupadd -r -g 141 inspircd >/dev/null
+ getent passwd inspircd &>/dev/null || useradd -r -u 141 -g inspircd -d /var/lib/inspircd -s /bin/false inspircd >/dev/null
+}
+
+post_install() {
+ create_user
+ echo '==> You will need to create a config file for inspircd'
+ echo '==> cp /usr/share/inspircd/examples/inspircd.conf.example /etc/inspircd/inspircd.conf'
+ echo '==> You will need to change the pidfile. To do this you can insert the following into your config.'
+ echo '==> <pid file="/var/lib/inspircd/inspircd.pid">'
+ echo '==> Remember to use absolute paths in your config directory and not relative paths like you would do with a user-based inspircd install.'
+}
+
+post_upgrade() {
+ create_user
+}
+
+post_remove() {
+ getent passwd inspircd &>/dev/null && userdel inspircd
+}