akkoma/postgresql/start.sh

25 lines
416 B
Bash
Raw Normal View History

2022-11-27 15:12:31 -07:00
#!/bin/bash
export SHELL="/bin/bash"
FILE='/configured.txt'
#Set Permissions
chmod -R 777 /saves
#Configure Local Time
cp -f /usr/share/zoneinfo/US/Mountain /etc/localtime
#Start Cron and Postgresql
2022-12-13 14:33:11 -07:00
cron
2022-11-27 15:12:31 -07:00
#Restore latest Database if container is new
if [ ! -f "$FILE" ]
then
#bash /restore.sh
bash /setup.sh
touch /configured.txt
fi
2022-12-13 14:33:11 -07:00
su postgres -s $SHELL -lc "$PG_BIN/pg_ctl start -D $PG_DIR"
2022-11-27 15:12:31 -07:00
tail -f /dev/null