2020-02-22 07:03:59 +00:00
|
|
|
#!/bin/sh -e
|
2020-01-23 09:00:03 +00:00
|
|
|
|
2021-01-31 12:26:19 +00:00
|
|
|
# We don't need those here (HTTP_HOST would cause false SELF_URL_PATH check failures)
|
|
|
|
unset HTTP_PORT
|
|
|
|
unset HTTP_HOST
|
|
|
|
|
2022-06-10 15:21:12 +00:00
|
|
|
unset ADMIN_USER_PASS
|
|
|
|
unset AUTO_CREATE_USER_PASS
|
|
|
|
|
2020-01-23 10:55:44 +00:00
|
|
|
# wait for the app container to delete .app_is_ready and perform rsync, etc.
|
|
|
|
sleep 30
|
|
|
|
|
2021-02-22 20:48:14 +00:00
|
|
|
if ! id app >/dev/null 2>&1; then
|
2022-02-20 09:52:21 +00:00
|
|
|
# what if i actually need a duplicate GID/UID group?
|
|
|
|
|
|
|
|
addgroup -g $OWNER_GID app || echo app:x:$OWNER_GID:app | \
|
|
|
|
tee -a /etc/group
|
|
|
|
|
|
|
|
adduser -D -h /var/www/html -G app -u $OWNER_UID app || \
|
|
|
|
echo app:x:$OWNER_UID:$OWNER_GID:Linux User,,,:/var/www/html:/bin/ash | tee -a /etc/passwd
|
2020-01-23 15:50:04 +00:00
|
|
|
fi
|
2020-01-23 13:59:10 +00:00
|
|
|
|
2021-02-01 05:41:30 +00:00
|
|
|
while ! pg_isready -h $TTRSS_DB_HOST -U $TTRSS_DB_USER; do
|
|
|
|
echo waiting until $TTRSS_DB_HOST is ready...
|
2020-01-23 09:00:03 +00:00
|
|
|
sleep 3
|
|
|
|
done
|
|
|
|
|
2022-04-10 04:47:24 +00:00
|
|
|
sed -i.bak "s/^\(memory_limit\) = \(.*\)/\1 = ${PHP_WORKER_MEMORY_LIMIT}/" \
|
2022-07-16 08:14:02 +00:00
|
|
|
/etc/php8/php.ini
|
2022-04-10 04:47:24 +00:00
|
|
|
|
2022-04-10 04:48:58 +00:00
|
|
|
DST_DIR=/var/www/html/tt-rss
|
|
|
|
|
2020-01-23 10:55:44 +00:00
|
|
|
while [ ! -s $DST_DIR/config.php -a -e $DST_DIR/.app_is_ready ]; do
|
|
|
|
echo waiting for app container...
|
2020-01-23 09:00:03 +00:00
|
|
|
sleep 3
|
|
|
|
done
|
|
|
|
|
2022-07-16 08:14:02 +00:00
|
|
|
sudo -E -u app /usr/bin/php8 /var/www/html/tt-rss/update_daemon2.php
|