[Unit]
Description=Zephir backend
After=networking.target syslog.target creoled.service
Wants=creoled.service
ConditionPathExists=/etc/eole/release
Requires=postgresql.service

[Service]
LimitNOFILE=8192
WorkingDirectory=/usr/share/zephir
ExecStartPre=/usr/share/zephir/utils/zephir_init.sh
ExecStart=/usr/bin/twistd3 \
    --nodaemon \
    --no_save \
    --umask 022 \
    --pidfile /var/run/zephir_backend.pid \
    -o zephir_backend
ExecStartPost=/usr/bin/touch /var/lock/zephir_backend
ExecStartPost=/usr/share/zephir/utils/zephir_scan.sh
ExecStopPost=/bin/rm -f /var/spool/uucp/lock
ExecStopPost=/bin/rm -f /var/lock/zephir_backend
Restart=always
SyslogIdentifier=zephir_backend

[Install]
WantedBy=multi-user.target
