diff options
Diffstat (limited to 'kvmd.install')
-rw-r--r-- | kvmd.install | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kvmd.install b/kvmd.install index ca0593f7..469fba8c 100644 --- a/kvmd.install +++ b/kvmd.install @@ -27,7 +27,8 @@ post_upgrade() { done chown kvmd /var/lib/kvmd/msd 2>/dev/null || true - chown kvmd-pst /var/lib/kvmd/pst 2>/dev/null || true + chown kvmd-pst:kvmd-pst /var/lib/kvmd/pst 2>/dev/null || true + chmod 1775 /var/lib/kvmd/pst 2>/dev/null || true if [ ! -e /etc/kvmd/nginx/ssl/server.crt ]; then echo "==> Generating KVMD-Nginx certificate ..." @@ -96,6 +97,11 @@ EOF systemctl disable kvmd-pass || true fi + if [[ "$(vercmp "$2" 4.5)" -lt 0 ]]; then + sed -i 's/X-kvmd\.pst-user=kvmd-pst/X-kvmd.pst-user=kvmd-pst,X-kvmd.pst-group=kvmd-pst/g' /etc/fstab + touch -t 200701011000 /etc/fstab + fi + # Some update deletes /etc/motd, WTF # shellcheck disable=SC2015,SC2166 [ ! -f /etc/motd -a -f /etc/motd.pacsave ] && mv /etc/motd.pacsave /etc/motd || true |