mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-03 18:06:04 -05:00
[config] Build conf/service, added user/group name config
systemd service and config files populated with paths/users Added user/group override options to configure Added man ref in service file
This commit is contained in:
parent
8b4b55b748
commit
17d3058147
2
.gitignore
vendored
2
.gitignore
vendored
@ -29,6 +29,8 @@ missing
|
||||
stamp-h1
|
||||
autotools-stamp
|
||||
build-stamp
|
||||
forked-daapd.conf
|
||||
forked-daapd.service
|
||||
|
||||
# ignore debian packaging for convenience
|
||||
debian/
|
||||
|
26
Makefile.am
26
Makefile.am
@ -1,6 +1,11 @@
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
sysconf_DATA = forked-daapd.conf
|
||||
CONF_FILE = forked-daapd.conf
|
||||
SYSTEMD_SERVICE_FILE = forked-daapd.service
|
||||
|
||||
sysconf_DATA = $(CONF_FILE)
|
||||
|
||||
BUILT_SOURCES = $(CONF_FILE) $(SYSTEMD_SERVICE_FILE)
|
||||
|
||||
SUBDIRS = sqlext src
|
||||
|
||||
@ -17,8 +22,25 @@ nobase_dist_doc_DATA = \
|
||||
scripts/pairinghelper.sh
|
||||
|
||||
EXTRA_DIST = \
|
||||
forked-daapd.conf
|
||||
$(CONF_FILE).in \
|
||||
$(SYSTEMD_SERVICE_FILE).in
|
||||
|
||||
install-data-hook:
|
||||
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/$(PACKAGE)/libspotify"
|
||||
|
||||
CLEANFILES = $(BUILT_SOURCES)
|
||||
|
||||
do_subst = sed -e 's|@sbindir[@]|$(sbindir)|g' \
|
||||
-e 's|@localstatedir[@]|$(localstatedir)|g' \
|
||||
-e 's|@PACKAGE[@]|$(PACKAGE)|g' \
|
||||
-e 's|@DAAPD_USER[@]|$(DAAPD_USER)|g'
|
||||
|
||||
# these files use $prefix, which is determined at build (not configure) time
|
||||
$(CONF_FILE) $(SYSTEMD_SERVICE_FILE): Makefile
|
||||
$(AM_V_at)rm -f $@ $@-t
|
||||
$(AM_V_GEN)$(do_subst) "$(srcdir)/$@.in" > $@-t
|
||||
$(AM_V_at)mv $@-t $@
|
||||
|
||||
$(CONF_FILE): $(srcdir)/$(CONF_FILE).in
|
||||
|
||||
$(SYSTEMD_SERVICE_FILE): $(srcdir)/$(SYSTEMD_SERVICE_FILE).in
|
||||
|
17
configure.ac
17
configure.ac
@ -279,6 +279,23 @@ AS_IF([test "x$enable_mpd" != "xno"], [
|
||||
AC_DEFINE(MPD, 1, [Define to 1 to enable MPD support])
|
||||
])
|
||||
AM_CONDITIONAL(COND_MPD, [test "x$enable_mpd" != "xno"])
|
||||
|
||||
#
|
||||
# Defining users and groups
|
||||
#
|
||||
AC_ARG_WITH([daapd_user],
|
||||
[AS_HELP_STRING([--with-daapd-user=USER],
|
||||
[User for running forked-daapd (default=daapd)])],
|
||||
[test x"$withval" = xyes && withval=], [withval=])
|
||||
DAAPD_USER=${withval:-daapd}
|
||||
AC_SUBST(DAAPD_USER)
|
||||
|
||||
AC_ARG_WITH([daapd_group],
|
||||
[AS_HELP_STRING([--with-daapd-group=GROUP],
|
||||
[Group for daapd user (default=USER)])],
|
||||
[test x"$withval" = xyes && withval=], [withval=])
|
||||
DAAPD_GROUP=${withval:-$DAAPD_USER}
|
||||
AC_SUBST(DAAPD_GROUP)
|
||||
dnl --- End options ---
|
||||
|
||||
dnl Checks for header files.
|
||||
|
@ -11,14 +11,14 @@ general {
|
||||
# Username
|
||||
# Make sure the user has read access to the library directories you set
|
||||
# below, and full access to the databases, log and local audio
|
||||
uid = "daapd"
|
||||
uid = "@DAAPD_USER@"
|
||||
|
||||
# Database location
|
||||
# db_path = "/var/cache/forked-daapd/songs3.db"
|
||||
# db_path = "@localstatedir@/cache/@PACKAGE@/songs3.db"
|
||||
|
||||
# Log file and level
|
||||
# Available levels: fatal, log, warning, info, debug, spam
|
||||
logfile = "/var/log/forked-daapd.log"
|
||||
logfile = "@localstatedir@/log/@PACKAGE@.log"
|
||||
loglevel = log
|
||||
|
||||
# Admin password for the non-existent web interface
|
||||
@ -28,7 +28,7 @@ general {
|
||||
ipv6 = yes
|
||||
|
||||
# Location of cache database
|
||||
# cache_path = "/var/cache/forked-daapd/cache.db"
|
||||
# cache_path = "@localstatedir@/cache/@PACKAGE@/cache.db"
|
||||
|
||||
# DAAP requests that take longer than this threshold (in msec) get their
|
||||
# replies cached for next time. Set to 0 to disable caching.
|
||||
@ -203,7 +203,7 @@ audio {
|
||||
# Spotify settings (only have effect if Spotify enabled - see README/INSTALL)
|
||||
spotify {
|
||||
# Directory where user settings should be stored (credentials)
|
||||
# settings_dir = "/var/cache/forked-daapd/libspotify"
|
||||
# settings_dir = "@localstatedir@/cache/@PACKAGE@/libspotify"
|
||||
|
||||
# Cache directory
|
||||
# cache_dir = "/tmp"
|
@ -1,9 +1,10 @@
|
||||
[Unit]
|
||||
Description=DAAP/DACP (iTunes), RSP and MPD server, supports AirPlay and Remote
|
||||
Documentation=man:forked-daapd(8)
|
||||
After=network.target sound.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/forked-daapd -f
|
||||
ExecStart=@sbindir@/forked-daapd -f
|
||||
|
||||
# Restart, but not more than once every 10 minutes
|
||||
Restart=on-failure
|
Loading…
x
Reference in New Issue
Block a user