pleroma/pleroma/start.sh
Your Name 309897cfb0 fix
2021-11-02 13:23:15 -06:00

33 lines
591 B
Bash

#!/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
crond
#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 Pleroma
su pleroma -s $SHELL -lc "/opt/pleroma/bin/pleroma daemon"&
tail -f /dev/null