diff --git a/packaging/postinstall.sh b/packaging/postinstall.sh index c92e9f9a..26ee255a 100755 --- a/packaging/postinstall.sh +++ b/packaging/postinstall.sh @@ -7,15 +7,14 @@ if [ -f /tmp/sshportal_mariadb ]; then SOCKET="$(mysqladmin variables | grep ".sock " | awk '{print $4}')" readonly SOCKET -tee /etc/systemd/system/sshportal.service.d/mariadb.conf << END +tee /etc/systemd/system/sshportal.service.d/mariadb.conf >/dev/null 2>&1 << END [Service] StateDirectory= Environment=SSHPORTAL_DB_DRIVER=mysql Environment=SSHPORTAL_LOGS_LOCATION=/var/log/sshportal/session -Environment=SSHPORTAL_DATABASE_URL=sshportal@unix($SOCKET)/sshportal?charset=utf8\&parseTime=true\&loc=Local +Environment=SSHPORTAL_DATABASE_URL=sshportal@unix($SOCKET)/sshportal?charset=utf8&parseTime=true&loc=Local END - -rm -f /tmp/sshportal_mariadb + rm -f /tmp/sshportal_mariadb fi if command -v selinuxenabled >/dev/null 2>&1; then diff --git a/packaging/postremove.sh b/packaging/postremove.sh index aa0d9db4..666a2680 100755 --- a/packaging/postremove.sh +++ b/packaging/postremove.sh @@ -12,7 +12,7 @@ fi systemctl is-active --quiet sshportal && systemctl stop sshportal rm -f /etc/logrotate.d/sshportal || true -[ -d /etc/systemd/system/sshportal.service.d ] && rm -f /etc/systemd/system/sshportal.service.d +[ -d /etc/systemd/system/sshportal.service.d ] && rm -rf /etc/systemd/system/sshportal.service.d grep -q sshportal /etc/passwd && userdel sshportal systemctl daemon-reload