From f94cbd51ef35089e3855eb70578053baf4747a23 Mon Sep 17 00:00:00 2001 From: libvoid <135131094+libvoid@users.noreply.github.com> Date: Fri, 1 Sep 2023 13:34:50 +0200 Subject: [PATCH] fix: quieter output + cleanup --- packaging/postinstall.sh | 7 +++---- packaging/postremove.sh | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packaging/postinstall.sh b/packaging/postinstall.sh index c92e9f9a5..26ee255a2 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 aa0d9db44..666a26806 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