#!/command/with-contenv bash

# Disable the php-fpm service as the container doesn't use it
rm /etc/s6-overlay/s6-rc.d/user/contents.d/svc-php-fpm

if [[ ${SIDEKIQ_ONLY,,} == "true" ]]; then
    rm /etc/s6-overlay/s6-rc.d/user/contents.d/svc-mastodon
    rm /etc/s6-overlay/s6-rc.d/user/contents.d/svc-nginx
    rm /etc/s6-overlay/s6-rc.d/user/contents.d/svc-streaming
fi

exec /docker-mods
