Restructure entrypoint ops

This commit is contained in:
Raelon Masters
2020-04-07 15:10:52 -04:00
parent d9ba44e317
commit 1aeb2fbea6
3 changed files with 13 additions and 5 deletions

6
database.sh vendored Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
sh -c sudo -u postgres pg_ctl -D /var/lib/postgres/data -l /srv/logs/pgsql.log start
sh -c sudo -u postgres psql -f create_db.sql
rm /srv/http/database.sh
echo "sudo -u postgres pg_ctl -D /var/lib/postgres/data -l /srv/logs/lgsql.log start" > /srv/http/database.sh
chmod +x /srv/http/database.sh