diff options
author | Erich Eckner <git@eckner.net> | 2024-10-13 22:23:54 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2024-11-09 17:34:40 +0100 |
commit | 62e14c36a804f90e50db28d150e5cea1de2f52c4 (patch) | |
tree | b057503669ba96cccf6179f3205c9892c0275b99 /mandos/mandos.install | |
parent | 0cd3899055a710b639bbea99489c6964c7a7f668 (diff) | |
download | archlinuxewe-mandos.tar.xz |
mandos: aur originalmandos
Diffstat (limited to 'mandos/mandos.install')
-rw-r--r-- | mandos/mandos.install | 35 |
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 +} |