bip/systemd/bip.service
Pierre-Louis Bonicoli 3f4a260a54
Add systemd unit files
Largely inspired by https://lwn.net/Articles/584175/
"They must be suitable for every distribution to use."

Packagers must define:
- ExecStart=/path/to/bip_env.sh
- Environment=BIP_DEFAULT_CONFIG='/path/to/default/bip'
using a unit file drop-in bip-config.service.d/<distrib>.conf
2018-02-19 19:56:37 +01:00

24 lines
424 B
Desktop File

[Unit]
Description=Bip IRC Proxy
Requires=network.target
Wants=bip-config.service
After=bip-config.service
[Service]
EnvironmentFile=/run/sysconfig/bip
Type=forking
User=bip
Group=bip
ExecStartPre=/bin/sh -c '[ $ENABLED != 0 ]'
ExecStart=/usr/bin/bip $DAEMON_ARGS
ExecReload=/bin/kill -HUP $MAINPID
RuntimeDirectory=bip
RuntimeDirectoryMode=0750
KillMode=process
Restart=on-abnormal
[Install]
WantedBy=multi-user.target