Jail: cam

one time
zfs create ship/cam

create jail
export JAIL=cam
export JAILHOSTNAME=cam
export JAILDOMAIN=ahlawat.com
export JAILIP=54
export JAILUSER=X
export JAILUSERID=1000
export JAILUSERVNC=false

/root/FreeBSD/jails/create.sh $JAIL $JAILHOSTNAME $JAILDOMAIN $JAILIP $JAILUSER $JAILUSERID $JAILUSERVNC

# the local cameras are on the video VLAN
# the cloud connected cameras are on the guest VLAN
# reconfigure jail networking
iocage set interfaces=vnet0:bridge1,vnet1:bridge5,vnet2:bridge9 ip4_addr="vnet0|192.168.0.$JAILIP/24,vnet1|192.168.5.$JAILIP/24,vnet2|192.168.200.$JAILIP/24" ip6_addr="vnet0|fd01::$JAILIP/64,vnet1|fd05::$JAILIP/64,vnet2|fd09::$JAILIP/64" exec_prestop="ifconfig epair0b -vnet ioc-$JAIL;ifconfig epair1b -vnet ioc-$JAIL;ifconfig epair2b -vnet ioc-$JAIL" $JAIL 

#iocage exec $JAIL "pkg install -y motion py37-pip curl rsync"
iocage exec $JAIL "pkg install -y motion py27-pip curl"

iocage exec $JAIL "mkdir -p /usr/local/var/lib/motioneye"
iocage fstab -a $JAIL /mnt/ship/cam /usr/local/var/lib/motioneye nullfs rw 0 0
iocage fstab -l $JAIL

iocage exec $JAIL "pip-2.7 install motioneye"

#first time only
#iocage exec $JAIL "mkdir -p /mnt/config/secret/motioneye"
#iocage exec $JAIL "cp /usr/local/share/motioneye/extra/motioneye.conf.sample /mnt/config/secret/motioneye/motioneye.conf"

iocage exec $JAIL "cp /mnt/config/camserver /usr/local/etc/rc.d"
iocage exec $JAIL "chmod 555 /usr/local/etc/rc.d/camserver"
iocage exec $JAIL "sysrc camserver_enable=YES"
iocage exec $JAIL "service camserver start"


Notes:
pip install --upgrade motioneye

meyectl startserver -b -c /mnt/config/motioneye/motioneye.conf

Python3 support TBA - https://github.com/ccrisan/motioneye/issues/1208 - maybe in 0.5

# don't upgrade pip - it trips the FreeBSD checksum daily check script
#iocage exec $JAIL "pip install --upgrade pip"


New steps for syncing with Arlo ...



Showcased here is a capital and operational cost effective approach, using minimal server and networking hardware with multiple virtualized applications for Home and Business. This solution template can be easily scaled out and adapted for larger Enterprise deployments.
drop by the diyIT Matrix public room at #diyit:matrix.ahlawat.com
if you have any IT questions/feedback or to request pro bono consulting for a nonprofit

message me privately at @sharad:matrix.ahlawat.com
or email me at - sharad@ahlawat.com - pgpkey: 68DD6B89
Networking and Security Technologist.
EngineerĀ andĀ an avid Programmer.

https://sharad.ahlawat.com
strive to learn and pass on the knowledge to the next generation
one day humanity will understand the meaning of life and hopefully it will be more than ASCII 42 = "*" regex for whatever you want it to be,
and destiny is more than just a roll of a pair of dice with 42 dots (Lets nail down Quantum Entanglement)

May you Live Long (Intelligently) and Prosper and work on technology that matters.
© 2024 Sharad Ahlawat

No personal identifying data is collected or any form of analytics/metrics reported to a third-party by this website.