about ready to start testingabout ready to start testing
This commit is contained in:
25
rootfs/etc/service/startup/run
Normal file
25
rootfs/etc/service/startup/run
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
touch /state/.starting
|
||||
echo "mastodon-startup starting up..."
|
||||
|
||||
if [[ ! -d /state/envdir ]]; then
|
||||
mkdir -p /state/envdir
|
||||
chown mastodon:mastodon /state/envdir
|
||||
fi
|
||||
|
||||
if [[ ! -e /state/envdir/HOME ]]; then
|
||||
echo "/mastodon" > /state/envdir/HOME
|
||||
fi
|
||||
|
||||
cd /mastodon/app
|
||||
|
||||
if [ "$RUN_DB_MIGRATIONS" == "true" ]; then
|
||||
echo "Running database migrations..."
|
||||
envdir /state/envdir chpst -u mastodon:mastodon bash -c "bundle exec rake db:migrate"
|
||||
fi
|
||||
|
||||
rm /state/.starting
|
||||
while true ; do
|
||||
sleep 86400
|
||||
done
|
||||
Reference in New Issue
Block a user