File: run

package info (click to toggle)
runit-services 0.10.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 404 kB
  • sloc: sh: 477; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 653 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env /lib/runit/invoke-run
#Copyright: 2023 Friedhelm Mehnert <friedhelm@friedhelms.net>
#License: CC0-1.0

exec 2>&1

MPDCONF_FILE=/etc/mpd.conf
# Locatian can be changed within "/etc/default/mpd"
if [ $MPDCONF ]; then
   MPDCONF_FILE=$MPDCONF
fi

# The daemon refuses to start, if it can not create a pid file.
# We must provide a directory for this. Since we don't USE the
# pid file for anything, we can however ignore, if the locatian
# for it has been changed within the config file. We simply
# always use the compiled in default.
install -m 755 --owner=mpd  --group=audio -d  /run/mpd

exec ##bin## --no-daemon --stderr $MPDCONF_FILE