From 13a82e0368a29a932dbd8de2504d84a1c7484cb2 Mon Sep 17 00:00:00 2001
From: Britney Fransen <brfransen@gmail.com>
Date: Thu, 30 Jan 2020 22:45:13 +0000
Subject: webmin: update to 1.941. closes #1045

---
 abs/extra/webmin/.gitignore            |   5 +
 abs/extra/webmin/PKGBUILD              | 369 ++++++++++++++++-----------------
 abs/extra/webmin/__changelog           |  13 ++
 abs/extra/webmin/setup-post.sh         |   4 +
 abs/extra/webmin/setup-pre.sh          |  18 ++
 abs/extra/webmin/webmin-config.tar.bz2 | Bin 3125 -> 3930 bytes
 abs/extra/webmin/webmin-pacman.tar.bz2 | Bin 833 -> 0 bytes
 abs/extra/webmin/webmin.install        |  34 ---
 abs/extra/webmin/webmin.logrotate      |   8 +
 abs/extra/webmin/webmin.pam            |   5 +
 abs/extra/webmin/webmin.service        |   1 +
 abs/extra/webmin/webmin.tmpfiles       |   2 +
 12 files changed, 229 insertions(+), 230 deletions(-)
 create mode 100644 abs/extra/webmin/.gitignore
 create mode 100644 abs/extra/webmin/setup-post.sh
 create mode 100644 abs/extra/webmin/setup-pre.sh
 delete mode 100644 abs/extra/webmin/webmin-pacman.tar.bz2
 delete mode 100644 abs/extra/webmin/webmin.install
 create mode 100644 abs/extra/webmin/webmin.logrotate
 create mode 100644 abs/extra/webmin/webmin.pam
 create mode 100644 abs/extra/webmin/webmin.tmpfiles

diff --git a/abs/extra/webmin/.gitignore b/abs/extra/webmin/.gitignore
new file mode 100644
index 0000000..6e0effd
--- /dev/null
+++ b/abs/extra/webmin/.gitignore
@@ -0,0 +1,5 @@
+src
+pkg
+webmin-config
+*x86_64.pkg.tar.xz
+webmin-*.tar.gz
diff --git a/abs/extra/webmin/PKGBUILD b/abs/extra/webmin/PKGBUILD
index c823016..e6d7fb1 100644
--- a/abs/extra/webmin/PKGBUILD
+++ b/abs/extra/webmin/PKGBUILD
@@ -1,225 +1,202 @@
-# $Id$
-# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+# Maintainer: Amish <contact at via dot aur>
+# Contributor: Daniel Milde <daniel at milde dot cz>
+# Contributor: Felix Schindler <ftschindler at aur dot archlinux>
+
 pkgname=webmin
-pkgver=1.780
+pkgver=1.941
 pkgrel=1
-pkgdesc="a web-based interface for system administration"
-arch=(i686 x86_64)
+pkgdesc="A web-based administration interface for Unix systems"
+arch=(x86_64)
 license=('custom:webmin')
 url="http://www.webmin.com/"
-depends=('perl' 'perl-perl4-corelibs')
-makedepends=('perl-net-ssleay')
-backup=('etc/webmin/miniserv.conf' 'etc/webmin/miniserv.users' 'etc/webmin/config' 'etc/webmin/webmin.cats' \
-'etc/webmin/pacman/config' \
-'etc/webmin/at/config' \
+depends=('perl' 'perl-net-ssleay' 'perl-authen-pam' 'perl-encode-detect' 'openssl')
+backup=('etc/webmin/miniserv.conf' 'etc/webmin/miniserv.users' \
+'etc/webmin/config' 'etc/webmin/webmin.acl' \
 'etc/webmin/acl/config' \
-'etc/webmin/lvm/config' \
-'etc/webmin/net/config' \
-'etc/webmin/nis/config' \
-'etc/webmin/pam/config' \
-'etc/webmin/cron/config' \
-'etc/webmin/file/config' \
-'etc/webmin/grub/config' \
-'etc/webmin/init/config' \
-'etc/webmin/ipfw/config' \
-'etc/webmin/lilo/config' \
-'etc/webmin/proc/config' \
-'etc/webmin/raid/config' \
-'etc/webmin/spam/config' \
-'etc/webmin/sshd/config' \
-'etc/webmin/time/config' \
+'etc/webmin/adsl-client/config' \
+'etc/webmin/ajaxterm/config' \
+'etc/webmin/apache/config' \
+'etc/webmin/at/config' \
+'etc/webmin/backup-config/config' \
+'etc/webmin/bacula-backup/config' \
+'etc/webmin/bandwidth/config' \
+'etc/webmin/bind8/config' \
+'etc/webmin/change-user/config' \
+'etc/webmin/cluster-copy/config' \
+'etc/webmin/cluster-cron/config' \
 'etc/webmin/cluster-passwd/config' \
-'etc/webmin/software/config' \
-'etc/webmin/webminlog/config' \
+'etc/webmin/cluster-shell/config' \
+'etc/webmin/cluster-software/config' \
+'etc/webmin/cluster-useradmin/config' \
+'etc/webmin/cluster-usermin/config' \
 'etc/webmin/cluster-webmin/config' \
-'etc/webmin/bind8/config' \
+'etc/webmin/cron/config' \
+'etc/webmin/custom/config' \
 'etc/webmin/dhcpd/config' \
+'etc/webmin/dovecot/config' \
+'etc/webmin/exim/config' \
+'etc/webmin/exports/config' \
+'etc/webmin/fail2ban/config' \
 'etc/webmin/fdisk/config' \
+'etc/webmin/fetchmail/config' \
+'etc/webmin/filemin/config' \
+'etc/webmin/filter/config' \
+'etc/webmin/firewall/config' \
+'etc/webmin/firewall6/config' \
+'etc/webmin/firewalld/config' \
+'etc/webmin/fsdump/config' \
+'etc/webmin/heartbeat/config' \
+'etc/webmin/htaccess-htpasswd/config' \
+'etc/webmin/idmapd/config' \
+'etc/webmin/init/config' \
+'etc/webmin/inittab/config' \
+'etc/webmin/ipsec/config' \
+'etc/webmin/iscsi-client/config' \
+'etc/webmin/iscsi-server/config' \
+'etc/webmin/iscsi-target/config' \
+'etc/webmin/iscsi-tgtd/config' \
+'etc/webmin/jabber/config' \
+'etc/webmin/krb5/config' \
+'etc/webmin/ldap-client/config' \
+'etc/webmin/ldap-server/config' \
+'etc/webmin/ldap-useradmin/config' \
+'etc/webmin/logrotate/config' \
+'etc/webmin/lpadmin/config' \
+'etc/webmin/lvm/config' \
+'etc/webmin/mailboxes/config' \
+'etc/webmin/mailcap/config' \
+'etc/webmin/man/config' \
+'etc/webmin/mon/config' \
 'etc/webmin/mount/config' \
 'etc/webmin/mysql/config' \
+'etc/webmin/net/config' \
+'etc/webmin/nis/config' \
+'etc/webmin/openslp/config' \
+'etc/webmin/pam/config' \
+'etc/webmin/pap/config' \
+'etc/webmin/passwd/config' \
+'etc/webmin/phpini/config' \
+'etc/webmin/postfix/config' \
+'etc/webmin/postgresql/config' \
+'etc/webmin/ppp-client/config' \
+'etc/webmin/pptp-client/config' \
+'etc/webmin/pptp-server/config' \
+'etc/webmin/proc/config' \
+'etc/webmin/procmail/config' \
+'etc/webmin/proftpd/config' \
+'etc/webmin/qmailadmin/config' \
 'etc/webmin/quota/config' \
+'etc/webmin/raid/config' \
 'etc/webmin/samba/config' \
+'etc/webmin/sarg/config' \
+'etc/webmin/sendmail/config' \
+'etc/webmin/servers/config' \
 'etc/webmin/shell/config' \
+'etc/webmin/shorewall/config' \
+'etc/webmin/shorewall6/config' \
+'etc/webmin/smart-status/config' \
+'etc/webmin/spam/config' \
 'etc/webmin/squid/config' \
-'etc/webmin/adsl-client/config' \
-'etc/webmin/servers/config' \
-'etc/webmin/cluster-shell/config' \
-'etc/webmin/bandwidth/config' \
-'etc/webmin/ppp-client/config' \
-'etc/webmin/lpadmin/config' \
-'etc/webmin/apache/config' \
-'etc/webmin/firewall/config' \
-'etc/webmin/stunnel/config' \
-'etc/webmin/burner/config' \
-'etc/webmin/exports/config' \
-'etc/webmin/backup-config/config' \
-'etc/webmin/custom/config' \
-'etc/webmin/htaccess-htpasswd/config' \
-'etc/webmin/logrotate/config' \
-'etc/webmin/format/config' \
-'etc/webmin/fsdump/config' \
-'etc/webmin/passwd/config' \
-'etc/webmin/cluster-useradmin/config' \
-'etc/webmin/cluster-software/config' \
-'etc/webmin/cluster-copy/config' \
-'etc/webmin/cluster-cron/config' \
-'etc/webmin/telnet/config' \
+'etc/webmin/sshd/config' \
 'etc/webmin/status/config' \
+'etc/webmin/stunnel/config' \
 'etc/webmin/syslog/config' \
+'etc/webmin/system-status/config' \
+'etc/webmin/tcpwrappers/config' \
+'etc/webmin/telnet/config' \
+'etc/webmin/time/config' \
+'etc/webmin/tunnel/config' \
 'etc/webmin/updown/config' \
+'etc/webmin/useradmin/config' \
 'etc/webmin/usermin/config' \
+'etc/webmin/vgetty/config' \
+'etc/webmin/webalizer/config' \
 'etc/webmin/webmin/config' \
+'etc/webmin/webmincron/config' \
+'etc/webmin/webminlog/config' \
+'etc/webmin/wuftpd/config' \
 'etc/webmin/xinetd/config' \
-'etc/webmin/openslp/config' \
-'etc/webmin/procmail/config' \
-'etc/webmin/fetchmail/config' \
-'etc/webmin/postgresql/config' \
-'etc/webmin/useradmin/config' \
-'etc/webmin/mailboxes/config' \
-'etc/webmin/inittab/config' \
-'etc/webmin/change-user/config' \
-'etc/webmin/postfix/config' \
-'etc/webmin/proftpd/config' \
-'etc/webmin/pserver/config' \
-'etc/webmin/dnsadmin/config' )
-install=webmin.install
-source=(http://downloads.sourceforge.net/sourceforge/webadmin/$pkgname-$pkgver.tar.gz
-        ftp://ftp.archlinux.org/other/webmin/webmin-config.tar.bz2
-        ftp://ftp.archlinux.org/other/webmin/webmin-pacman.tar.bz2
+'etc/logrotate.d/webmin' \
+'etc/pam.d/webmin' )
+source=("http://downloads.sourceforge.net/sourceforge/webadmin/$pkgname-$pkgver.tar.gz"
+        setup-pre.sh
+        setup-post.sh
+        webmin-config.tar.bz2
+        webmin.pam
+        webmin.logrotate
+        webmin.tmpfiles
         webmin.service)
-options=(!strip)
+options=(!strip !zipman)
+
+prepare() {
+    cd "$srcdir"/$pkgname-$pkgver
+
+    # remove modules that we do not support and stuff that is not needed
+    rm -r {bsdexports,bsdfdisk,cpan,dfsadmin,format,grub,hpuxexports,inetd,ipfilter,ipfw,package-updates,rbac,sgiexports,smf,software,syslog-ng,zones}
+    rm mount/freebsd-mounts* mount/netbsd-mounts* mount/openbsd-mounts* mount/macos-mounts*
+    rm webmin-gentoo-init webmin-init webmin-daemon
+
+    # dont allow webmin to update itself, must update via pacman
+    rm {webmin,usermin}/{update.cgi,update.pl,update_sched.cgi,upgrade.cgi,edit_upgrade.cgi,install_mod.cgi,delete_mod.cgi,install_theme.cgi}
+
+    # remove config files for other distros, make Arch linux related additions
+    find . ! -name 'config-generic-linux' ! -name 'config-ALL-linux' ! -name 'config-lib.pl' -name 'config-*' -exec rm '{}' \+
+    echo 'LinHES	Any version	generic-linux	*	-d "/etc/pacman.d"' > os_list.txt
+    cp -rp "$srcdir"/webmin-config/* "$srcdir"/$pkgname-$pkgver/
+    install -m 700 "$srcdir"/setup-{pre,post}.sh "$srcdir"/$pkgname-$pkgver/
+}
 
 package() {
-  # NOTE: USE --asroot build option to avoid fakeroot error!
-  cd "$srcdir"/$pkgname-$pkgver
-  # add patches from webmin.com
-  #for i in ../*.wbm
-  #do tar xvf $i
-  #done
-  #for i in ../*.wbt
-  #do tar xvf $i
-  #done
-  # delete stuff that's not needed
-  rm -f mount/freebsd-mounts*
-  rm -f mount/openbsd-mounts*
-  rm -f mount/macos-mounts*
-
-  # remove modules we do not support
-  rm -rf {bacula-backup,ldap-useradmin,mon,sentry,frox,jabber,majordomo,qmail,sendmail,sarg,wuftpd,webalizer,inetd,ipsec,pap,pptp-client,pptp-server,shorewall,smart-status,vgetty,heartbeat,cfengine,cpan,sgiexports,hpuxexports,qmailadmin,bsdexports,dfsadmin}
-
-  #remove config files from other distros
-  rm -f $(find . ! -name 'config-generic-linux' ! -name 'config-\*-linux' ! -name 'config-lib.pl' -name 'config-*')
-
-  # remove caldera theme
-  rm -rf caldera
-
-  # remove init-scripts from other distros
-  rm webmin-gentoo-init
-  rm webmin-init
-  rm webmin-caldera-init
-  rm webmin-daemon
-
-  # remove update stuff to avoid problems with updating webmin,modules and themes without pacman
-  rm -f webmin/{update.cgi,update.pl,update_sched.cgi,upgrade.cgi,edit_upgrade.cgi,install_mod.cgi,delete_mod.cgi,install_theme.cgi}
-  rm -f usermin/{upgrade.cgi,update.cgi,update.pl,edit_upgrade.cgi,install_mod.cgi,delete_mod.cgi,install_theme.cgi}
-
-  # remove modules add because we don't want files installed without pacman control
-  rm -f webmin/{install_mod.cgi,delete_mod.cgi}
-
-  # setting perl path
-  (find . -name '*.cgi' ; find . -name '*.pl') | perl perlpath.pl /usr/bin/perl -
-
-  # create dirs
-  mkdir -p "$pkgdir"/opt/webmin
-  mkdir -p "$pkgdir"/var/log/webmin
-  mkdir -p "$pkgdir"/etc/webmin
-
-  # install pam stuff
-  install -D -m 644 webmin-pam "$pkgdir"/etc/pam.d/webmin
-
-  # remove other distros and add only Archlinux don't change next line else it will not work!
-  rm os_list.txt
-  echo 'LinHES			Any version	generic-linux	*	-d "/etc/pacman.d"' >> os_list.txt
-
-  # Add rc.conf support to boot and shutdown menu and lock editing of this module
-  cd init/
-  sed -i -e 's:^local_down=.*:local_down=Archlinux RC.CONF,3,None:g' $(find . ! -name 'config.info.pl' -name 'config.info*')
-  sed -i -e 's:^local_script=.*:local_script=Archlinux RC.LOCAL,3,None:g' $(find . ! -name 'config.info.pl' -name 'config.info*')
-  sed -i -e 's:^index_downscript=.*:index_downscript=Archlinux RC.CONF:g' lang/*
-  sed -i -e 's:^index_script=.*:index_script=Archlinux RC.LOCAL:g' lang/*
-  sed -i -e 's:^noconfig=0:noconfig=1:g'  defaultacl
-
-  # Add pacman menu
-  cd "$srcdir"/$pkgname-$pkgver
-  cp -rf custom/ pacman
-  cp -rf mscstyle3/custom mscstyle3/pacman
-  sed -i -e 's:^noconfig=0:noconfig=1:g' -e 's:^edit=1:edit=0:g' pacman/defaultacl
-  sed -i -e '/desc/d' -e '/longdesc/d' pacman/module.info
-  sed -i -e 's:^name=Custom:name=Pacman:g' pacman/module.info
-  echo 'category=system' >> pacman/module.info
-  echo 'desc=Pacman' >> pacman/module.info
-  sed -i -e 's:^index_title=.*:index_title=Pacman:g' pacman/lang/*
-
-  # copy stuff to right dirs
-  cd "$srcdir"/$pkgname-$pkgver
-  cp -rp * "$pkgdir"/opt/webmin
-  cd "$srcdir"/webmin-config
-  cp -rfp * "$pkgdir"/opt/webmin
-
-  # define parameters for setup.sh
-  config_dir="$pkgdir"/etc/webmin
-  var_dir="$pkgdir"/var/log/webmin
-  perl=/usr/bin/perl
-  autoos=1
-  port=10000
-  login=root
-  crypt="XXX"
-  ssl=1
-  atboot=0
-  nostart=1
-  nochown=1
-  autothird=1
-  nouninstall=1
-  noperlpath=1
-  atbootyn=n
-  tempdir="$pkgdir"/tmp
-  export config_dir var_dir perl autoos port tempdir login crypt ssl nochown autothird nouninstall nostart noperlpath atbootyn
-
-  # Fix setup.sh
-  sed -i -e 's:read atbootyn::g' -e 's:exit 13::g' "$pkgdir"/opt/webmin/setup.sh
-  "$pkgdir"/opt/webmin/setup.sh
-
-  # Fixup the config files to use their real locations
-  sed -i 's:^pidfile=.*$:pidfile=/var/run/webmin.pid:' "$pkgdir"/etc/webmin/miniserv.conf
-  find "$pkgdir"/etc/webmin -type f -exec sed -i "s:$pkgdir::g" {} \;
-
-  # make it only accessible by localhost
-  echo 'allow=127.0.0.1 192.168. 172.16. 10.' >> "$pkgdir"/etc/webmin/miniserv.conf
-
-  # add don't fork so runit can manage it
-  echo 'nofork=1' >> "$pkgdir"/etc/webmin/miniserv.conf
-
-  # change mysql start stop cmds
-  sed -i -e 's:start_cmd=/etc/rc.d/mysqld start:start_cmd=/usr/bin/sv start mysql:g' \
+    # create basic directories
+    mkdir -p "$pkgdir"/{etc,opt,var/log}
+
+    export archpkgdir="$pkgdir"
+    cd "$srcdir"/$pkgname-$pkgver
+
+    # new version of iptables do not allow to run as non-root user
+    # so is_installed() check fails, so we avoid it in setup.sh
+    mv firewall/install_check{,.tmp}.pl
+    mv firewall6/install_check{,.tmp}.pl
+    "$srcdir"/$pkgname-$pkgver/setup.sh "$pkgdir"/opt/webmin
+
+    # move the files back in place
+    mv "$pkgdir"/opt/webmin/firewall/install_check{.tmp,}.pl
+    mv "$pkgdir"/opt/webmin/firewall6/install_check{.tmp,}.pl
+    mv firewall/install_check{.tmp,}.pl
+    mv firewall6/install_check{.tmp,}.pl
+
+    # fix the config files to use their real locations
+    find "$pkgdir"/etc/webmin -type f -exec sed -i -e "s:$pkgdir::g" {} \+
+
+    # install sources
+    install -D -m 644 "$srcdir"/webmin.service "$pkgdir"/usr/lib/systemd/system/webmin.service
+    install -D -m 644 "$srcdir"/webmin.pam "$pkgdir"/etc/pam.d/webmin
+    install -D -m 644 "$srcdir"/webmin.logrotate "$pkgdir"/etc/logrotate.d/webmin
+    install -D -m 644 "$srcdir"/webmin.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/webmin.conf
+    install -D -m 644 "$srcdir"/$pkgname-$pkgver/LICENCE "$pkgdir"/usr/share/licenses/webmin/LICENCE
+
+    # delete directories not to be packaged
+    rm -r "$pkgdir"/{tmp,var}
+
+    # LINHES - make it only accessible by localhost
+    echo 'allow=127.0.0.1 192.168. 172.16. 10.' >> "$pkgdir"/etc/webmin/miniserv.conf
+
+    # LINHES - add don't fork so runit can manage it
+    echo 'nofork=1' >> "$pkgdir"/etc/webmin/miniserv.conf
+
+    # LINHES - change mysql start stop cmds
+    sed -i -e 's:start_cmd=/etc/rc.d/mysqld start:start_cmd=/usr/bin/sv start mysql:g' \
          -e 's:pass=foo:pass=mythtv:g' -e 's:login=root:login=mythtv:g' \
          -e 's:stop_cmd=/etc/rc.d/mysqld stop:stop_cmd=/usr/bin/sv stop mysql:g' \
          "$pkgdir"/etc/webmin/mysql/config
+}
 
-  # install pacman menu
-  cd "$srcdir"/webmin-pacman/config
-  cp -rfp * "$pkgdir"/etc/webmin/pacman
-
-  # install systemd files
-  install -D -m 644 $srcdir/webmin.service $pkgdir/usr/lib/systemd/system/webmin.service
 
-  # delete temp dir
-  rm -r "$pkgdir"/tmp
-  # change sticky bit
-  chmod 0644 $pkgdir/opt/webmin/man/config-generic-linux
-  # install license
-  install -m 644 -D "$srcdir"/$pkgname-$pkgver/LICENCE "$pkgdir"/usr/share/licenses/webmin/LICENCE
-}
-md5sums=('d5de2ef2b47de718c7f1addbf0bc2e5c'
-         'b0b3e3fb231a12e60165b6b4d604dcfa'
-         'bfebb75bb94029b48c46b7f1ba1aa811'
-         'fc29ecb6a5cd8c278abe054e60381095')
+sha256sums=('3a19228d92556c7722c6fe56c9d4b73d477a19845b0dae3f018fc7fc0306b29a'
+            '3c27a52679607c73cdaa00c0735bea04cf66cf92ca4af6a7ac906eaed537b910'
+            '21b24cbbf88593f9da727e8f36dea283c8765002a378b3d4e55e6332387c43c6'
+            'd326da95233341ed0a6d51c6c28d9b47b5bbe8c1ae8e03e2578c24191dd14383'
+            'a979e236681c6a06906937cf0f012e976347af5d6d7e7ae04a11acb01cc2689d'
+            '9babd7f1e7e24ba4aeb5587a3cb46aa1e92904226cad84a4cbee5f9aaa408802'
+            '075c8156471d0fb4825a51b6411636102d2cf61d4eb5c7c097330e53cd9323b0'
+            '4757a44a07a4bcb6f919274f35b8ab27a34936b5f8d6aee9cdbcbde49e73fb7d')
diff --git a/abs/extra/webmin/__changelog b/abs/extra/webmin/__changelog
index 741481a..6531399 100644
--- a/abs/extra/webmin/__changelog
+++ b/abs/extra/webmin/__changelog
@@ -1,4 +1,17 @@
 PKGBUILD: Added private networks to miniserv.conf
+    # LINHES - make it only accessible by localhost
+    echo 'allow=127.0.0.1 192.168. 172.16. 10.' >> "$pkgdir"/etc/webmin/miniserv.conf
+
 PKGBUILD: Added nofork=1 to miniserv.conf
+    # LINHES - add don't fork so runit can manage it
+    echo 'nofork=1' >> "$pkgdir"/etc/webmin/miniserv.conf
+
 PKGBUILD: Change OS name to LinHES
+
 PKGBUILD: Change mysql start and stop and login and pass in mysql/config
+    # LINHES - change mysql start stop cmds
+    sed -i -e 's:start_cmd=/etc/rc.d/mysqld start:start_cmd=/usr/bin/sv start mysql:g' \
+         -e 's:pass=foo:pass=mythtv:g' -e 's:login=root:login=mythtv:g' \
+         -e 's:stop_cmd=/etc/rc.d/mysqld stop:stop_cmd=/usr/bin/sv stop mysql:g' \
+         "$pkgdir"/etc/webmin/mysql/config
+
diff --git a/abs/extra/webmin/setup-post.sh b/abs/extra/webmin/setup-post.sh
new file mode 100644
index 0000000..7057cc4
--- /dev/null
+++ b/abs/extra/webmin/setup-post.sh
@@ -0,0 +1,4 @@
+# more logging, other config changes and use pam
+echo -e 'logfiles=1\nlogfullfiles=1\ngotoone=1\nnoremember=1' >> "$archpkgdir"/etc/webmin/config
+sed -i -e 's:^pidfile=.*$:pidfile=/run/webmin.pid:' "$archpkgdir"/etc/webmin/miniserv.conf
+echo -e 'pam_only=1\npam_end=1\npam_conv=\nno_pam=0\nlogouttime=10' >> "$archpkgdir"/etc/webmin/miniserv.conf
diff --git a/abs/extra/webmin/setup-pre.sh b/abs/extra/webmin/setup-pre.sh
new file mode 100644
index 0000000..fc8562a
--- /dev/null
+++ b/abs/extra/webmin/setup-pre.sh
@@ -0,0 +1,18 @@
+config_dir="$archpkgdir"/etc/webmin
+var_dir="$archpkgdir"/var/log/webmin
+perl=/usr/bin/perl
+autoos=1
+port=10000
+noportcheck=1
+login=root
+crypt="x"
+ssl=1
+atboot=0
+nostart=1
+nochown=1
+autothird=1
+nouninstall=1
+atbootyn=n
+tempdir="$archpkgdir"/tmp
+pam=webmin
+export config_dir var_dir perl autoos port noportcheck login crypt ssl atboot nostart nochown autothird nouninstall atbootyn tempdir pam
diff --git a/abs/extra/webmin/webmin-config.tar.bz2 b/abs/extra/webmin/webmin-config.tar.bz2
index c7869ee..4e50b69 100644
Binary files a/abs/extra/webmin/webmin-config.tar.bz2 and b/abs/extra/webmin/webmin-config.tar.bz2 differ
diff --git a/abs/extra/webmin/webmin-pacman.tar.bz2 b/abs/extra/webmin/webmin-pacman.tar.bz2
deleted file mode 100644
index e8ad9fd..0000000
Binary files a/abs/extra/webmin/webmin-pacman.tar.bz2 and /dev/null differ
diff --git a/abs/extra/webmin/webmin.install b/abs/extra/webmin/webmin.install
deleted file mode 100644
index fc9fd44..0000000
--- a/abs/extra/webmin/webmin.install
+++ /dev/null
@@ -1,34 +0,0 @@
-# arg 1:  the new package version
-post_install() {
-  local crypt=$(grep "^root:" ${ROOT}/etc/shadow | cut -f 2 -d :)
-  crypt=${crypt//\\/\\\\}
-  crypt=${crypt//\//\\\/}
-  sed -i "s/root:XXX/root:${crypt}/" /etc/webmin/miniserv.users
-
-cat << EOF
-Note:
-==> It is not allowed to install 3rd party modules, or delete existing modules.
-==> Please write your own PKGBUILDS for 3rd party modules and additional themes.
-Setup:
-==> Point your web browser to http://localhost:10000 to use webmin.
-==> The access is restricted to localhost, if you want to connect from other locations
-==> change /etc/webmin/miniserv.conf to something like that: allow=127.0.0.1 <your-ip>
-==> If you want to have ssl encryption please install 'perl-net-ssleay' additional.
-EOF
-# fix man module
-  cd /opt/webmin/man
-  for i in $(find . -name '*.gz'); do
-  gzip -df $i
-  done
-}
-
-# arg 1:  the new package version
-# arg 2:  the old package version
-post_upgrade() {
-  post_install $1
-}
-
-pre_remove() {
-  # uninstall unzipped files
-  rm -r /opt/webmin/man
-}
diff --git a/abs/extra/webmin/webmin.logrotate b/abs/extra/webmin/webmin.logrotate
new file mode 100644
index 0000000..6bffde4
--- /dev/null
+++ b/abs/extra/webmin/webmin.logrotate
@@ -0,0 +1,8 @@
+/var/log/webmin/miniserv.error /var/log/webmin/*.log {
+   missingok
+   notifempty
+   sharedscripts
+   postrotate
+      /usr/bin/systemctl -q try-reload-or-restart webmin.service 2>/dev/null || true
+   endscript
+}
diff --git a/abs/extra/webmin/webmin.pam b/abs/extra/webmin/webmin.pam
new file mode 100644
index 0000000..9d354b0
--- /dev/null
+++ b/abs/extra/webmin/webmin.pam
@@ -0,0 +1,5 @@
+#%PAM-1.0
+auth      include   system-remote-login
+account   include   system-remote-login
+password  include   system-remote-login
+session   include   system-remote-login
diff --git a/abs/extra/webmin/webmin.service b/abs/extra/webmin/webmin.service
index a8a384a..1eea3d8 100644
--- a/abs/extra/webmin/webmin.service
+++ b/abs/extra/webmin/webmin.service
@@ -6,6 +6,7 @@ Type=oneshot
 RemainAfterExit=yes
 ExecStart=/etc/webmin/start
 ExecStop=/etc/webmin/stop
+ExecReload=/etc/webmin/reload
 
 [Install]
 WantedBy=multi-user.target
diff --git a/abs/extra/webmin/webmin.tmpfiles b/abs/extra/webmin/webmin.tmpfiles
new file mode 100644
index 0000000..3a66bf9
--- /dev/null
+++ b/abs/extra/webmin/webmin.tmpfiles
@@ -0,0 +1,2 @@
+d /var/log/webmin 0750 root bin -
+d /var/log/webmin/modules 0750 root root -
-- 
cgit v0.12

