diff options
author | Maxim Devaev <[email protected]> | 2024-08-20 05:43:47 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2024-08-20 05:43:47 +0300 |
commit | 39422f37ac421c94a010400f741fb8ad4c73c64f (patch) | |
tree | fd68ad1dec909db5dd06ae19c80b1e18a984e49a /kvmd.install | |
parent | 06b69d3dde2ffe8d3236aff18c6bc4f00ae005de (diff) |
sticky pst
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 |