Permalink
Browse files

Add missing directories for musicpd to work out of the box

Noticed by:	theraven

Fix mpd user home directory


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@309886 aed309b6-a8cd-e111-996c-001c23d10e55
  • Loading branch information...
1 parent e81cd6d commit e2fbb442ed9fc5262e1a5a1971ce1744159e9ded crees committed Jan 3, 2013
Showing with 12 additions and 13 deletions.
  1. +1 −1 UIDs
  2. +2 −3 audio/musicpd/Makefile
  3. +8 −8 audio/musicpd/files/musicpd.in
  4. +1 −1 audio/musicpd/pkg-plist
View
@@ -77,7 +77,7 @@ freeradius:*:133:133::0:0:FreeRADIUS Daemon:/nonexistent:/usr/sbin/nologin
undernet:*:134:134::0:0:Undernet ircu Daemon:/nonexistent:/usr/sbin/nologin
rabbitmq:*:135:135::0:0:RabbitMQ:/var/db/rabbitmq:/usr/sbin/nologin
dhcpd:*:136:136::0:0:ISC DHCP daemon:/nonexistent:/usr/sbin/nologin
-mpd:*:137:137::0:0:MusicPD pseudo-user:/usr/local/var/mpd:/usr/sbin/nologin
+mpd:*:137:137::0:0:MusicPD pseudo-user:/var/mpd:/usr/sbin/nologin
wolfpack:*:138:138::0:0:Wolfpack Empire Server:/usr/local/share/wolfpack:/usr/sbin/nologin
shellinabox:*:139:139::0:0:Shell In A Box:/nonexistent:/usr/sbin/nologin
amanda:*:140:140::0:0:Amanda Daemon:/var/db/amanda:/usr/sbin/nologin
@@ -2,7 +2,7 @@
PORTNAME= musicpd
PORTVERSION= 0.17.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= audio ipv6
MASTER_SITES= SF/${PORTNAME}/mpd/${PORTVERSION}
DISTNAME= mpd-${PORTVERSION}
@@ -267,8 +267,7 @@ post-install:
${CP} -p ${PREFIX}/etc/${MPDCONF}.sample \
${PREFIX}/etc/${MPDCONF} ; \
fi
- @${MKDIR} ${MPDDIR}
- @${INSTALL} -d -o ${MPDUSER} -g ${MPDGROUP} ${MPDDIR}
+ @${INSTALL} -d -o ${MPDUSER} -g ${MPDGROUP} ${MPDDIR} ${MPDDIR}/.mpd
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}
@@ -8,18 +8,22 @@
# Add the following line to /etc/rc.conf to enable mpd:
#
-# musicpd_enable="YES"
+# musicpd_enable=YES
. /etc/rc.subr
name=musicpd
rcvar=musicpd_enable
-start_precmd="${name}_getpidfile"
-stop_precmd="${name}_getpidfile"
+
+load_rc_config $name
+
+: ${musicpd_enable:=NO}
command=%%PREFIX%%/bin/musicpd
command_args=%%PREFIX%%/etc/%%MPDCONF%%
required_files=%%PREFIX%%/etc/%%MPDCONF%%
+start_precmd=${name}_getpidfile
+stop_precmd=${name}_getpidfile
musicpd_getpidfile()
{
@@ -31,8 +35,4 @@ musicpd_getpidfile()
fi
}
-load_rc_config $name
-
-: ${musicpd_enable="NO"}
-
-run_rc_command "$1"
+run_rc_command $1
@@ -2,4 +2,4 @@ bin/musicpd
@unexec if cmp -s %D/etc/%%MPDCONF%%.sample %D/etc/%%MPDCONF%%; then rm -f %D/etc/%%MPDCONF%%; fi
etc/%%MPDCONF%%.sample
@exec if [ ! -f %D/etc/%%MPDCONF%% ] ; then cp -p %D/%F %B/%%MPDCONF%%; fi
-@exec install -d -o %%MPDUSER%% -g %%MPDGROUP%% %%MPDDIR%%
+@exec install -d -o %%MPDUSER%% -g %%MPDGROUP%% %%MPDDIR%% %%MPDDIR%%/.mpd

0 comments on commit e2fbb44

Please sign in to comment.