gdraheim / docker-systemctl-replacement

docker systemctl replacement - allows to deploy to systemd-controlled containers without starting an actual systemd daemon (e.g. centos7, ubuntu16)
European Union Public License 1.2
1.39k stars 399 forks source link

ERROR:systemctl: nextcloud.service: Failed to parse service type, ignoring: exec #167

Open staeglis opened 1 year ago

staeglis commented 1 year ago

Is the exec service type unsupported at this time? During our tests in our Gitlab CI we get an error with the following unit.

[Unit]
Description=Nextcloud Cloud Storage
Requires=apache2.service fail2ban.service mariadb.service php8.1-fpm.service redis-server.service
After=apache2.service fail2ban.service mariadb.service php8.1-fpm.service redis-server.service
RequiresMountsFor=/nextcloud/local/userdata

[Service]
Type=exec
User=www-data
ExecStart=/usr/bin/php -f /var/www/nextcloud/occ maintenance:mode --off
ExecStop=/usr/bin/php -f /var/www/nextcloud/occ maintenance:mode --on
gdraheim commented 1 year ago

I did not know about that service type but the official documentation says it is just another variant of the service type "simple" that simply waits for the "exec" to be performed. That's the default in the systemctl-replacement so that it boils down to be an alias. This can be added quite quickly.