summaryrefslogtreecommitdiff
path: root/mandos/mandos.install
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2024-10-13 22:23:54 +0200
committerErich Eckner <git@eckner.net>2024-11-09 17:34:40 +0100
commit62e14c36a804f90e50db28d150e5cea1de2f52c4 (patch)
treeb057503669ba96cccf6179f3205c9892c0275b99 /mandos/mandos.install
parent0cd3899055a710b639bbea99489c6964c7a7f668 (diff)
downloadarchlinuxewe-62e14c36a804f90e50db28d150e5cea1de2f52c4.tar.xz
mandos: aur originalmandos
Diffstat (limited to 'mandos/mandos.install')
-rw-r--r--mandos/mandos.install35
1 files changed, 35 insertions, 0 deletions
diff --git a/mandos/mandos.install b/mandos/mandos.install
new file mode 100644
index 000000000..fa0726aae
--- /dev/null
+++ b/mandos/mandos.install
@@ -0,0 +1,35 @@
+post_install() {
+ if ! getent group _mandos > /dev/null; then
+ groupadd --system _mandos
+ fi
+ if ! getent passwd _mandos > /dev/null; then
+ useradd -c "Mandos Server" --system -d /var/lib/mandos -s /usr/bin/nologin -g _mandos _mandos
+ passwd -l _mandos > /dev/null
+ fi
+ mkdir -p /var/lib/mandos
+ chown -R _mandos:_mandos /var/lib/mandos > /dev/null
+
+ # reload dbus, otherwise the mandos server will not start up properly
+ systemctl reload-or-restart dbus
+
+ echo 'In /etc/avahi/avahi-daemon.conf , enable IPv6 by changing the option'
+ echo 'use-ipv6=yes'
+ echo 'Then restart the avahi-daemon service: systemctl restart avahi-daemon'
+ echo 'Clients will not be able to connect to the mandos server otherwise.'
+ echo 'After adding client configs to /etc/mandos/clients.conf'
+ echo 'start and enable the Mandos Server with'
+ echo 'systemctl start mandos ; systemctl enable mandos'
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ if getent passwd _mandos >/dev/null; then
+ userdel _mandos
+ fi
+ if getent group _mandos >/dev/null; then
+ groupdel _mandos
+ fi
+}