akkoma/start.sh

34 lines
639 B
Bash
Raw Normal View History

2023-03-27 09:39:11 -06:00
#!/bin/bash
export SHELL="/bin/bash"
FILE='/configured.txt'
# Start the instance to verify that everything is working as expected
#Set Permissions
#chown -R pleroma /var/lib/pleroma
#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
#Configure and start Nginx
mkdir -p /run/nginx
nginx
#Start Akkoma
su postgres -s $SHELL -lc "$PG_BIN/pg_ctl start -D $PG_DIR"&
sleep 60
su akkoma -s $SHELL -lc "/opt/akkoma/bin/pleroma start"