mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-10 06:51:54 +00:00
add systemd service files
to enable running fluidsynth as user service. Fixes #342
This commit is contained in:
parent
f125e8a9c6
commit
aa3703b2e3
3 changed files with 27 additions and 0 deletions
|
@ -475,6 +475,15 @@ if ( UNIX )
|
|||
configure_file ( fluidsynth.spec.in
|
||||
${CMAKE_BINARY_DIR}/fluidsynth.spec IMMEDIATE @ONLY )
|
||||
|
||||
if ( DEFINED FLUID_DAEMON_ENV_FILE)
|
||||
configure_file ( fluidsynth.service.in
|
||||
${CMAKE_BINARY_DIR}/fluidsynth.service @ONLY )
|
||||
|
||||
configure_file ( fluidsynth.conf.in
|
||||
${CMAKE_BINARY_DIR}/fluidsynth.conf @ONLY )
|
||||
|
||||
endif ( DEFINED FLUID_DAEMON_ENV_FILE )
|
||||
|
||||
# uninstall custom target
|
||||
configure_file ( "${CMAKE_SOURCE_DIR}/cmake_admin/cmake_uninstall.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY)
|
||||
|
|
5
fluidsynth.conf.in
Normal file
5
fluidsynth.conf.in
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Mandatory parameters (uncomment and edit)
|
||||
#SOUND_FONT=@DEFAULT_SOUNDFONT@
|
||||
|
||||
# Additional optional parameters (may be useful, see 'man fluidsynth' for further info)
|
||||
#OTHER_OPTS='-a alsa -m alsa_seq -r 48000'
|
13
fluidsynth.service.in
Normal file
13
fluidsynth.service.in
Normal file
|
@ -0,0 +1,13 @@
|
|||
[Unit]
|
||||
Description=FluidSynth Daemon
|
||||
Documentation=man:fluidsynth(1)
|
||||
After=sound.target
|
||||
|
||||
[Service]
|
||||
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
|
||||
|
Loading…
Reference in a new issue