diff options
author | feld <feld@FreeBSD.org> | 2016-01-08 01:26:21 +0800 |
---|---|---|
committer | feld <feld@FreeBSD.org> | 2016-01-08 01:26:21 +0800 |
commit | cd639b25ace199fd5a4c6cabdb4961976b8aecb3 (patch) | |
tree | b36b398a6b3f788596f79f14857324bd37b0b045 /net-p2p | |
parent | e7467b52e999a4f1cb8b43343b65d5be95551b86 (diff) | |
download | freebsd-ports-graphics-cd639b25ace199fd5a4c6cabdb4961976b8aecb3.tar.gz freebsd-ports-graphics-cd639b25ace199fd5a4c6cabdb4961976b8aecb3.tar.zst freebsd-ports-graphics-cd639b25ace199fd5a4c6cabdb4961976b8aecb3.zip |
net-p2p/sonarr: Fix $sonarr_data_dir creation
Now that $sonarr_data_dir is configurable, move creation from package to
rc script to prevent sonarr from failing to start successfully.
PR: 205986
MFH: 2016Q1
Diffstat (limited to 'net-p2p')
-rw-r--r-- | net-p2p/sonarr/Makefile | 3 | ||||
-rw-r--r-- | net-p2p/sonarr/files/sonarr.in | 11 | ||||
-rw-r--r-- | net-p2p/sonarr/pkg-plist | 1 |
3 files changed, 11 insertions, 4 deletions
diff --git a/net-p2p/sonarr/Makefile b/net-p2p/sonarr/Makefile index 0a12d182b75..56aa9683743 100644 --- a/net-p2p/sonarr/Makefile +++ b/net-p2p/sonarr/Makefile @@ -2,7 +2,7 @@ PORTNAME= sonarr PORTVERSION= 2.0.0.3645 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net-p2p MASTER_SITES= http://download.sonarr.tv/v2/master/mono/ DISTNAME= NzbDrone.master.${PORTVERSION}.mono @@ -27,6 +27,5 @@ USERS= sonarr do-install: ${INSTALL} -d -m 755 ${STAGEDIR}/${DATADIR} cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${STAGEDIR}/${DATADIR} - ${MKDIR} ${STAGEDIR}/${PREFIX}/sonarr .include <bsd.port.mk> diff --git a/net-p2p/sonarr/files/sonarr.in b/net-p2p/sonarr/files/sonarr.in index 9e775cc61c6..29ea352d6d7 100644 --- a/net-p2p/sonarr/files/sonarr.in +++ b/net-p2p/sonarr/files/sonarr.in @@ -27,6 +27,15 @@ pidfile="${sonarr_data_dir}/nzbdrone.pid" procname="%%PREFIX%%/bin/mono" command="/usr/sbin/daemon" command_args="-f ${procname} %%DATADIR%%/NzbDrone.exe --nobrowser --data=${sonarr_data_dir}" -start_precmd="export XDG_CONFIG_HOME=${sonarr_data_dir}" +start_precmd=sonarr_precmd + +sonarr_precmd() +{ + export XDG_CONFIG_HOME=${sonarr_data_dir} + + if [ ! -d ${sonarr_data_dir} ]; then + install -d -o ${sonarr_user} ${sonarr_data_dir} + fi +} run_rc_command "$1" diff --git a/net-p2p/sonarr/pkg-plist b/net-p2p/sonarr/pkg-plist index ff243f67512..2871b43a96b 100644 --- a/net-p2p/sonarr/pkg-plist +++ b/net-p2p/sonarr/pkg-plist @@ -148,4 +148,3 @@ %%DATADIR%%/UI/templates.js %%DATADIR%%/UI/vendor.js %%DATADIR%%/UI/vendor.map -@dir(sonarr,wheel,755) sonarr |