akkoma/postgresql/start.sh
Your Name 18e973b6a9 fix
2022-12-13 14:33:11 -07:00

25 lines
416 B
Bash

#!/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
cron
#Restore latest Database if container is new
if [ ! -f "$FILE" ]
then
#bash /restore.sh
bash /setup.sh
touch /configured.txt
fi
su postgres -s $SHELL -lc "$PG_BIN/pg_ctl start -D $PG_DIR"
tail -f /dev/null