Yakje
Explorer
- Joined
- Feb 8, 2017
- Messages
- 82
Version: FreeNAS-11.0-U4
Guide i "kind of" used: Headphones setup guide
So after ditching Freenas Corral, which i had grown quite fond of tbh. I am now trying to get everything setup in FreeNAS 11.0.
Till now i have setup Plex, Sabnzbd, Sonarr & Radarr, all running in a generic jail (i am not using the Plugins)
As i was trying to do the same for "Headphones" i ran into a problem, whenever i try to run the command
My headphones RCfile:
I am not sure why it is not able to start, since i did execute the command:
Guide i "kind of" used: Headphones setup guide
So after ditching Freenas Corral, which i had grown quite fond of tbh. I am now trying to get everything setup in FreeNAS 11.0.
Till now i have setup Plex, Sabnzbd, Sonarr & Radarr, all running in a generic jail (i am not using the Plugins)
As i was trying to do the same for "Headphones" i ran into a problem, whenever i try to run the command
service headphones start
the following error pops up:
/usr/local/etc/rc.d/headphones: WARNING: run_rc_command: cannot run /config/Headphones.py
My headphones RCfile:
#!/bin/sh
#
# PROVIDE: headphones
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# headphones_enable (bool): Set to NO by default.
# Set it to YES to enable it.
# headphones_user: The user account Headphones daemon runs as what
# you want it to be. It uses '_sabnzbd' user by
# default. Do not sets it as empty or it will run
# as root.
# headphones_dir: Directory where Headphones lives.
# Default: /usr/local/headphones
# headphones_pid: The name of the pidfile to create.
# Default is headphones.pid in headphones_dir.
. /etc/rc.subr
name="headphones"
rcvar=${name}_enable
load_rc_config ${name}
: "${headphones_enable:="NO"}"
: "${headphones_user:="headphones"}"
: "${headphones_dir:="/usr/local/headphones"}"
: "${headphones_conf:="/usr/local/headphones/config.ini"}"
command="${headphones_dir}/Headphones.py"
command_interpreter="/usr/local/bin/python"
pidfile="/var/run/headphones/headphones.pid"
start_precmd="headphones_start_precmd"
headphones_flags="--daemon --nolaunch --pidfile $pidfile --config $headphones_conf $headphones_flags"
headphones_start_precmd() {
if [ $($ID -u) != 0 ]; then
err 1 "Must be root."
fi
if [ ! -d /var/run/headphones ]; then
install -do $headphones_user /var/run/headphones
fi
}
load_rc_config ${name}
run_rc_command "$1"
#
# PROVIDE: headphones
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# headphones_enable (bool): Set to NO by default.
# Set it to YES to enable it.
# headphones_user: The user account Headphones daemon runs as what
# you want it to be. It uses '_sabnzbd' user by
# default. Do not sets it as empty or it will run
# as root.
# headphones_dir: Directory where Headphones lives.
# Default: /usr/local/headphones
# headphones_pid: The name of the pidfile to create.
# Default is headphones.pid in headphones_dir.
. /etc/rc.subr
name="headphones"
rcvar=${name}_enable
load_rc_config ${name}
: "${headphones_enable:="NO"}"
: "${headphones_user:="headphones"}"
: "${headphones_dir:="/usr/local/headphones"}"
: "${headphones_conf:="/usr/local/headphones/config.ini"}"
command="${headphones_dir}/Headphones.py"
command_interpreter="/usr/local/bin/python"
pidfile="/var/run/headphones/headphones.pid"
start_precmd="headphones_start_precmd"
headphones_flags="--daemon --nolaunch --pidfile $pidfile --config $headphones_conf $headphones_flags"
headphones_start_precmd() {
if [ $($ID -u) != 0 ]; then
err 1 "Must be root."
fi
if [ ! -d /var/run/headphones ]; then
install -do $headphones_user /var/run/headphones
fi
}
load_rc_config ${name}
run_rc_command "$1"
I am not sure why it is not able to start, since i did execute the command:
chmod +x /usr/local/etc/rc.d/headphones
, any ideas on this matter are highly appreciated!
Last edited: