mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
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
This commit is contained in:
parent
b707ac80a4
commit
8eff792d53
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=405476
3 changed files with 11 additions and 4 deletions
|
@ -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>
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -148,4 +148,3 @@
|
|||
%%DATADIR%%/UI/templates.js
|
||||
%%DATADIR%%/UI/vendor.js
|
||||
%%DATADIR%%/UI/vendor.map
|
||||
@dir(sonarr,wheel,755) sonarr
|
||||
|
|
Loading…
Add table
Reference in a new issue