fix some bugs

This commit is contained in:
2019-12-09 05:11:52 -08:00
parent 53f3538cda
commit 2862faf676
4 changed files with 37 additions and 10 deletions

View File

@@ -24,6 +24,14 @@ if [[ ! -d /state/db ]]; then
chmod go-rwx /state/db/data
fi
function shutdown()
{
echo "Shutting down PostgreSQL"
pkill postgres
}
trap shutdown HUP INT QUIT ABRT KILL ALRM TERM TSTP
exec \
chpst -u mastodon:mastodon \
/usr/lib/postgresql/10/bin/postmaster -D /state/db 2>&1