@@ -101,7 +101,8 @@ function enable_autoshutdown {
101
101
}
102
102
103
103
function disable_fail2ban {
104
- sed -i "s/autostart=.*/autostart=false/" /etc/supervisor/services/fail2ban.conf
104
+ sed -i "s/autostart=.*/autostart=false/" /etc/supervisor/services/fail2ban.conf
105
+ sed -i "s/autorestart=.*/autorestart=false/" /etc/supervisor/services/fail2ban.conf
105
106
}
106
107
107
108
function setup_postgres {
@@ -274,25 +275,25 @@ find /etc/supervisor/ -type d -exec chmod 0770 {} +
274
275
find /etc/supervisor/ -type f -exec chmod 0660 {} +
275
276
276
277
# Start services in the background
277
- if [ -z "${POSTGRES_ONLY:-}" ]; then
278
- sed -i "s| # - postgrest| - postgrest|g" /etc/adminapi/adminapi.yaml
279
- sed -i "s|files = db-only/\*.conf|files = services/\*.conf db-only/\*.conf|g" $SUPERVISOR_CONF
280
- configure_services
281
- else
278
+ if [ "${POSTGRES_ONLY:-}" == "true" ]; then
282
279
sed -i "s| - postgrest| # - postgrest|g" /etc/adminapi/adminapi.yaml
283
280
sed -i "s|files = services/\*.conf db-only/\*.conf|files = db-only/\*.conf|g" $SUPERVISOR_CONF
284
281
/init/configure-adminapi.sh
282
+ else
283
+ sed -i "s| # - postgrest| - postgrest|g" /etc/adminapi/adminapi.yaml
284
+ sed -i "s|files = db-only/\*.conf|files = services/\*.conf db-only/\*.conf|g" $SUPERVISOR_CONF
285
+ configure_services
285
286
fi
286
287
287
- if [ "${AUTOSHUTDOWN_ENABLED:-}" ]; then
288
+ if [ "${AUTOSHUTDOWN_ENABLED:-}" == "true" ]; then
288
289
enable_autoshutdown
289
290
fi
290
291
291
- if [ "${FAIL2BAN_DISABLED:-}" ]; then
292
+ if [ "${FAIL2BAN_DISABLED:-}" == "true" ]; then
292
293
disable_fail2ban
293
294
fi
294
295
295
- if [ "${PLATFORM_DEPLOYMENT:-}" ]; then
296
+ if [ "${PLATFORM_DEPLOYMENT:-}" == "true" ]; then
296
297
enable_swap
297
298
create_lsn_checkpoint_file
298
299
0 commit comments