What is the default user:group that channels runs as in Freenas?

Okay, I updated our freebsd installer script to be user/group aware.

Try this and LMK if it works:

pw groupadd -n admin -g 1000
pw groupmod admin -m channels
cd /usr/local 
mkdir -p channels-dvr 
chown -R channels:channels channels-dvr
curl -f -s https://getchannels.com/dvr/setup.sh | su channels env DOWNLOAD_ONLY=1 sh
sysrc channels_dvr_user=channels
sysrc channels_dvr_group=admin
curl -f -s https://getchannels.com/dvr/install-freebsd.sh | sh

Ok, I’ll try that out. The only thing different would be not having the config located outside of my jails volume but channels shouldn’t need that since the config isn’t as complicated as having to setup something like sonarr all over again in the event of a jail disk failure.

DOWNLOAD_ONLY command not recognized

typo’d, fixed in edit above (DOWNLOAD_ONLY=1)

Also running into this now but wasn’t before…

root@channels:/usr/local # curl -f -s https://getchannels.com/dvr/setup.sh | sh 
Downloading Channels DVR 2018.01.30.0033 (freebsd-x86_64) to /usr/local/channels
-dvr.....                                                                       
channels_dvr_enable:  -> YES                                                    
daemon: illegal option -- g                                                     
usage: daemon [-cfrS] [-p child_pidfile] [-P supervisor_pidfile]                
              [-u user] [-o output_file] [-t title]                             
              [-l syslog_facility] [-s syslog_priority]                         
              [-T syslog_tag] [-m output_mask]                                  
command arguments ...

Okay try again, without the sysrc channels_dvr_group....

DOWNLOAD_ONLY=1: Command not found.
(23) Failed writing body

Try curl -f -s ... | sudo -u channels env DOWNLOAD_ONLY=1 sh

sudo: command not found (i didn’t install sudo since everything seems to run without it)

-u: command not found

Okay, try

curl -f -s … | su channels env DOWNLOAD_ONLY=1 sh

root@channels:/usr/local # chown -R channels:channels channels-dvr              
root@channels:/usr/local # curl -f -s ... | channels env DOWNLOAD_ONLY=1 sh     
channels: Command not found.                                                    
root@channels:/usr/local # curl -f -s https://getchannels.com/dvr/setup.sh | sh 
Downloading Channels DVR 2018.01.30.0033 (freebsd-x86_64) to /usr/local/channels
-dvr.....                                                                       
channels_dvr_enable:  -> YES                                                    
Channels DVR has been installed. Visit http://dvr-channels.local:8089/ in your b
rowser.                                                                         
root@channels:/usr/local # chown -R channels:channels channels-dvr              
root@channels:/usr/local # sysrc channels_dvr_user=channels                     
channels_dvr_user:  -> channels                                                 
root@channels:/usr/local # sysrc channels_dvr_group=channels                    
channels_dvr_group:  -> channels                                                
root@channels:/usr/local # ps aux | grep channels-dvr                           
root 13972  0.0  0.0  14828  1800  0  S+J  20:45   0:00.00 grep channels-dvr

The curls are not right. The “…” was meant to be a placeholder for the URL. You only need to run the DOWNLOAD_ONLY version, and not the old one.

I updated What is the default user:group that channels runs as in Freenas?

IGNORE: using this for c/p

echo '{"pkgs":["curl","ca_root_nss","sudo"]}' > /tmp/pkg.json
iocage create -n "channels" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="vnet0|192.168.1.77/24" defaultrouter="192.168.1.1" vnet="on" allow_raw_sockets="1" boot="on"
rm /tmp/pkg.json
iocage exec channels mkdir /usr/local/etc/rc.d
iocage exec channels "pw user add channels -c channels -u 820 -d /nonexistent -s /usr/bin/nologin"
iocage console channels
pw groupadd -n admin -g 1000
pw groupmod admin -m channels
cd /usr/local 
mkdir -p channels-dvr 
curl -f -s https://getchannels.com/dvr/setup.sh | env DOWNLOAD_ONLY=1 sh
chown -R channels:channels channels-dvr
sysrc channels_dvr_user=channels
curl -f -s https://getchannels.com/dvr/install-freebsd.sh -o channels-dvr/install.sh
chmod +x channels-dvr/install.sh
sh channels-dvr/install.sh
echo 'channels_dvr_enable="YES"' >> /etc/rc.conf
exit
iocage fstab -a channels /mnt/storage/dvr /dvr nullfs rw 0 0
iocage fstab -a channels /mnt/transcode/channels /streaming nullfs rw 0 0 
iocage exec channels 'sysrc ifconfig_epair0_name="epair0b"'
iocage restart channels

getting an error: “nologin not found in usr/bin”

Should I create the channels user differently?

something is wrong here, nologin won’t work

pw user add channels -c channels -u 820 -d /nonexistent -s /usr/bin/nologin

Might be in sbin, /usr/sbin/nologin

root@channels:/usr/local # curl -f -s https://getchannels.com/dvr/setup.sh | su 
channels env DOWNLOAD_ONLY=1 sh                                                 
This account is currently not available.                                        
(23) Failed writing body

Hmm, I guess since it’s setup as nologin you can’t use it to run commands.

create the user differently?