fluidsynth/fluidsynth.service.in
Florian Léger 099369f8b7 Improve systemd integration
When fluidsynth is run as a service using systemd, make sure
the service is considered started only when it is ready to process events.

In order to do so:
 - Add an optional runtime dependency to libsystemd to the fluidsynth executable
 - Change the systemd service type to "notify"
 - Have fluidsynth notify systemd that the service is started after the server is started
 - Have fluidsynth notify systemd that the service is stopping after joining the server thread
2019-03-02 10:18:32 +01:00

15 lines
337 B
SYSTEMD

[Unit]
Description=FluidSynth Daemon
Documentation=man:fluidsynth(1)
After=sound.target
[Service]
Type=notify
NotifyAccess=main
EnvironmentFile=@FLUID_DAEMON_ENV_FILE@
EnvironmentFile=-%h/.config/fluidsynth
ExecStart=@CMAKE_INSTALL_PREFIX@/@BIN_INSTALL_DIR@/fluidsynth -is $OTHER_OPTS $SOUND_FONT
[Install]
WantedBy=multi-user.target