Native systemd support
Posted: 16 Jun 2016, 05:23
/usr/lib/systemd/system/madsonic.service
/usr/lib/tmpfiles.d/madsonic.conf
This version will use for settings /etc/conf.d/madsonic
Code: Select all
[Unit]
Description=Madsonic media streaming solution
[Service]
User=madsonic
Group=madsonic
EnvironmentFile=/etc/conf.d/madsonic
ExecStart=/usr/bin/madsonic \
--init-memory=192 \
--pidfile=/run/madsonic/madsonic.pid \
--update=false \
--home=${MADSONIC_HOME} \
--host=${MADSONIC_HOST} \
--port=${MADSONIC_PORT} \
--https-port=${MADSONIC_HTTPS_PORT} \
--context-path=${MADSONIC_CONTEXT_PATH} \
--max-memory=${MADSONIC_MAX_MEMORY} \
--default-music-folder=${MADSONIC_DEFAULT_MUSIC_FOLDER} \
--default-upload-folder=${MADSONIC_DEFAULT_UPLOAD_FOLDER} \
--default-podcast-folder=${MADSONIC_DEFAULT_PODCAST_FOLDER} \
--default-playlist-import-folder=${MADSONIC_DEFAULT_PLAYLIST_IMPORT_FOLDER} \
--default-playlist-export-folder=${MADSONIC_DEFAULT_PLAYLIST_EXPORT_FOLDER} \
--default-playlist-backup-folder=${MADSONIC_DEFAULT_PLAYLIST_BACKUP_FOLDER} \
--default-transcode-folder=${MADSONIC_DEFAULT_TRANSCODE_FOLDER} \
--timezone=${MADSONIC_DEFAULT_TIMEZONE} \
--gzip=${MADSONIC_GZIP}
PIDFile=/run/madsonic/madsonic.pid
[Install]
WantedBy=multi-user.target
Code: Select all
d /run/madsonic 0755 madsonic madsonic