Hi everybody,
I have a FreeNAS server at home and want to install Domoticz in a Jail
I followed the instructions I found on https://www.domoticz.com/wiki/FreeNAS
I created a new jail, downloaded domoticz etc.
Now, if I go to directory ~/domoticz/domoticz and input the command ./domoticz than it runs perfectly
What I want to do is to autostart domoticz when I turn on the FreeNAS server
Unfortunately on the instruction page, (https://www.domoticz.com/wiki/FreeNAS) at the last paragraph the link is dead and I am not able to create the file named domoticz inside the rc.d directory
I have no experience in FreeBSD or Linux so please help me accordingly
Thanks in advance....
Domoticz Installation on FreeNAS - Need Help
Moderators: leecollings, remb0
-
- Posts: 5
- Joined: Friday 09 March 2018 9:25
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Domoticz Installation on FreeNAS - Need Help
Hi,
First, i do know very little about Linux, FreeBSD, FreeNAS or Domoticz. I was guided a very lot when i made my system setup.
Now I have Domoticz with Open Z-wave in IOCAGE jai in FreeNAS 11.1-U1. Everything is working just fine. All installation guides seems to be some how imperfect and there was also a spelling mistakes in the 'domoticz_stop' section. In WARDEN jail i got several problem with linking USB to the jail, etc the symbolic link disappeared when booting. If you use Open Z-wave the symbolic link must be done in each start up, at least it was like that way in my WARDEN jail Domoticz. Now my Domiticz is in the IOCAGE jail. My home automation setup is in a building and testig phase and i am learning how to do things - in very slow way. Now 1 am working with Motion service to add ip camera to the setup. Anyway, in warden jail, my autostart problem was solved like it is here + post init scrip which makes symbolic link to the jail in each startup.
/etc/rc.conf
/usr/local/etc/rc.d/domoticz
EDIT: this is based the file i found from FreeNAS forum. I have made only a error fix missin '}'. Later i have made some changes etc. db dir outside from the jail and user&group as domoticz.
First, i do know very little about Linux, FreeBSD, FreeNAS or Domoticz. I was guided a very lot when i made my system setup.
Now I have Domoticz with Open Z-wave in IOCAGE jai in FreeNAS 11.1-U1. Everything is working just fine. All installation guides seems to be some how imperfect and there was also a spelling mistakes in the 'domoticz_stop' section. In WARDEN jail i got several problem with linking USB to the jail, etc the symbolic link disappeared when booting. If you use Open Z-wave the symbolic link must be done in each start up, at least it was like that way in my WARDEN jail Domoticz. Now my Domiticz is in the IOCAGE jail. My home automation setup is in a building and testig phase and i am learning how to do things - in very slow way. Now 1 am working with Motion service to add ip camera to the setup. Anyway, in warden jail, my autostart problem was solved like it is here + post init scrip which makes symbolic link to the jail in each startup.
/etc/rc.conf
Code: Select all
hostname="domoticz"
devfs_enable="YES"
devfs_system_ruleset="devfsrules_common"
domoticz_enable="YES"
EDIT: this is based the file i found from FreeNAS forum. I have made only a error fix missin '}'. Later i have made some changes etc. db dir outside from the jail and user&group as domoticz.
Code: Select all
. /etc/rc.subr
name="domoticz"
rcvar="domoticz_enable"
stop_cmd="${name}_stop"
load_rc_config $name
: ${domoticz_dbdir:=/home/domoticz/domoticz}
: ${domoticz_user:=root}
: ${domoticz_group:=wheel}
: ${domoticz_enable:=NO}
: ${domoticz_directory:="/home/domoticz/domoticz/"}
: ${domoticz_args:="-syslog -daemon"}
#: ${domoticz_args:="-syslog -dbase /home/domoticz/domoticz/domoticz.db -daemon -wwwbind 0.0.0.0 -p /var/run/domoticz_1.pid"}
pidfile=${domoticz_pidfile:="/var/run/${hostname}.pid"}
command="/home/domoticz/domoticz/domoticz"
command_args="-dbase ${domoticz_dbdir}/domoticz.db -pidfile ${pidfile} ${domoticz_args}"
domoticz_stop() {
if [ -e "${pidfile}" ]; then
echo "Stopping ${name}..."
kill -9 `cat ${pidfile}`
rm ${pidfile}
fi
}
run_rc_command "$1"
Who is online
Users browsing this forum: No registered users and 1 guest