OpenBSD

Mpdscribble

mpdscribble is in OpenBSD packages(7), but does not come configured to run as a daemon, unlike mpd. To solve this, I created an rc.d script and an accompanying user.

Add a new user and group, _mpdscribble, with the following settings:

username: _mpdscribble
long name: mpdscribble
uid: 561 #this is 1 greater than the default mpd user
gid: 561
home directory: /var/cache/mpdscribble
shell: /sbin/nologin

Create the home directory:

# mkdir /var/cache/mpdscribble
# chown _mpdscribble:_mpdscribble /var/cache/mpdscribble

Create /etc/rc.d/mpdscribble

#!/bin/ksh
#

daemon="/usr/local/bin/mpdscribble"
daemon_user="_mpdscribble"

. /etc/rc.d/rc.subr

rc_pre() {
	install -d -o _mpdscribble /var/run/mpdscribble/
}

rc_cmd $1

Enable and start the daemon, and make sure it's running:

# rcctl enable mpdscribble
# rcctl start mpdscribble
$ ps aux |grep mpdscribble

Blix theme adapted by David Gilbert, powered by PmWiki