Skip to content

Commit

Permalink
fix: quieter output + cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
libvoid committed Sep 1, 2023
1 parent ec9d22e commit f94cbd5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions packaging/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packaging/postremove.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f94cbd5

Please sign in to comment.