The following systemd unit should do the trick:
Install to /usr/lib/systemd/system/olad.service

```
[Unit]
Description=Open Lighting Architecture daemon
Documentation=man:olad(1)
Requires=network.target

[Service]
ExecStart=/usr/bin/olad --log-level 3 --config-dir /etc/ola
Type=simple
Restart=on-failure
User=olad
Group=olad

[Install]
WantedBy=multi-user.target
Alias=ola.service
```

Rationale:
- Syslog is not needed any more: olad logs to stderr by default and that will 
go into the journal automatically
- PID files and daemon mode: olad runs as a foreground service anyway, systemd 
will take care of everything
- User and Group are required: olad refuses to start as root
- /etc/default/olad is somewhat obsolete: If someone wants to configure log 
level and config dir, they can just override the systemd service file

I'm not sure about the $remote_fs dependency in the original init script. Is 
that still needed?
Same for the hard dependency on the network - this could be an After= instead 
of a Requires=.

Reply via email to