Restructure and add update scripts

This commit is contained in:
kjeld Schouten-Lebbing 2020-02-27 19:58:24 +01:00
parent 2d59584dbc
commit 16cc33e37b
23 changed files with 77 additions and 7 deletions

2
jackett.sh → install/jackett.sh Executable file → Normal file
View File

@ -10,7 +10,7 @@ iocage exec jackett rm /usr/local/share/Jackett.Binaries.Mono.tar.gz
iocage exec jackett "pw user add jackett -c jackett -u 818 -d /nonexistent -s /usr/bin/nologin"
iocage exec jackett chown -R jackett:jackett /usr/local/share/Jackett /config
iocage exec jackett mkdir /usr/local/etc/rc.d
cp ./jackett-conf/jackett.rc /mnt/tank/iocage/jails/jackett/root/usr/local/etc/rc.d/jackett
cp ../includes/jackett-conf/jackett.rc /mnt/tank/iocage/jails/jackett/root/usr/local/etc/rc.d/jackett
iocage exec jackett chmod u+x /usr/local/etc/rc.d/jackett
iocage exec jackett sysrc "jackett_enable=YES"
iocage exec jackett service jackett restart

2
lidarr.sh → install/lidarr.sh Executable file → Normal file
View File

@ -14,7 +14,7 @@ iocage exec lidarr "rm /usr/local/share/v0.2.0.371/Lidarr.develop.0.2.0.371.linu
iocage exec lidarr "pw user add lidarr -c lidarr -u 353 -d /nonexistent -s /usr/bin/nologin"
iocage exec lidarr chown -R lidarr:lidarr /usr/local/share/Lidarr /config
iocage exec lidarr mkdir /usr/local/etc/rc.d
cp ./lidarr-conf/lidarr.rc /mnt/tank/iocage/jails/lidarr/root/usr/local/etc/rc.d/lidarr
cp ../includes/lidarr-conf/lidarr.rc /mnt/tank/iocage/jails/lidarr/root/usr/local/etc/rc.d/lidarr
iocage exec lidarr chmod u+x /usr/local/etc/rc.d/lidarr
iocage exec lidarr sysrc "lidarr_enable=YES"
iocage exec lidarr service lidarr start

4
organizr.sh → install/organizr.sh Executable file → Normal file
View File

@ -11,8 +11,8 @@ iocage exec organizr cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini
iocage exec organizr sed -i '' -e 's?;date.timezone =?date.timezone = "Universal"?g' /usr/local/etc/php.ini
iocage exec organizr sed -i '' -e 's?;cgi.fix_pathinfo=1?cgi.fix_pathinfo=0?g' /usr/local/etc/php.ini
mv /mnt/tank/iocage/jails/organizr/root/usr/local/etc/nginx/nginx.conf /mnt/tank/iocage/jails/organizr/root/usr/local/etc/nginx/nginx.conf.bak
cp ./organizr-conf/nginx.conf /mnt/tank/iocage/jails/organizr/root/usr/local/etc/nginx/nginx.conf
cp ./organizr-conf/custom /mnt/tank/iocage/jails/organizr/root/usr/local/etc/nginx/custom
cp ../includes/organizr-conf/nginx.conf /mnt/tank/iocage/jails/organizr/root/usr/local/etc/nginx/nginx.conf
cp ../includes/organizr-conf/custom /mnt/tank/iocage/jails/organizr/root/usr/local/etc/nginx/custom
iocage exec organizr git clone https://github.com/causefx/Organizr.git /usr/local/www/Organizr
iocage exec organizr chown -R www:www /usr/local/www /config /usr/local/etc/nginx/nginx.conf /usr/local/etc/nginx/custom
iocage exec organizr ln -s /config/config.php /usr/local/www/Organizr/api/config/config.php

2
plex.sh → install/plex.sh Executable file → Normal file
View File

@ -4,7 +4,7 @@ echo '{"pkgs":["plexmediaserver-plexpass","ca_root_nss","nano"]}' > /tmp/pkg.jso
iocage create -n "plex" -p /tmp/pkg.json -r 11.3-RELEASE interfaces="vnet0:bridge30" ip4_addr="vnet0|192.168.30.26/24" defaultrouter="192.168.30.1" vnet="on" allow_raw_sockets="1" boot="on"
rm /tmp/pkg.json
iocage exec plex "mkdir -p /usr/local/etc/pkg/repos"
cp ./plex-conf/FreeBSD.conf /mnt/tank/iocage/jails/plex/root/usr/local/etc/pkg/repos/FreeBSD.conf
cp ../includes/plex-conf/FreeBSD.conf /mnt/tank/iocage/jails/plex/root/usr/local/etc/pkg/repos/FreeBSD.conf
iocage exec plex mkdir -p /config
iocage exec plex mkdir -p /mnt/library
iocage fstab -a plex /mnt/tank/apps/plex /config nullfs rw 0 0

2
radarr.sh → install/radarr.sh Executable file → Normal file
View File

@ -14,7 +14,7 @@ iocage exec radarr rm /usr/local/share/Radarr.develop.0.2.0.1480.linux.tar.gz
iocage exec radarr "pw user add radarr -c radarr -u 352 -d /nonexistent -s /usr/bin/nologin"
iocage exec radarr chown -R radarr:radarr /usr/local/share/Radarr /config
iocage exec radarr mkdir /usr/local/etc/rc.d
cp ./radarr-conf/radarr.rc /mnt/tank/iocage/jails/radarr/root/usr/local/etc/rc.d/radarr
cp ../includes/radarr-conf/radarr.rc /mnt/tank/iocage/jails/radarr/root/usr/local/etc/rc.d/radarr
iocage exec radarr chmod u+x /usr/local/etc/rc.d/radarr
iocage exec radarr sysrc "radarr_enable=YES"
iocage exec radarr service radarr start

2
sonarr.sh → install/sonarr.sh Executable file → Normal file
View File

@ -14,7 +14,7 @@ iocage exec sonarr rm /usr/local/share/NzbDrone.master.tar.gz
iocage exec sonarr "pw user add sonarr -c sonarr -u 351 -d /nonexistent -s /usr/bin/nologin"
iocage exec sonarr chown -R sonarr:sonarr /usr/local/share/NzbDrone /config
iocage exec sonarr mkdir /usr/local/etc/rc.d
cp ./sonarr-conf/sonarr.rc /mnt/tank/iocage/jails/sonarr/root/usr/local/etc/rc.d/sonarr
cp ../includes/sonarr-conf/sonarr.rc /mnt/tank/iocage/jails/sonarr/root/usr/local/etc/rc.d/sonarr
iocage exec sonarr chmod u+x /usr/local/etc/rc.d/sonarr
iocage exec sonarr sysrc "sonarr_enable=YES"
iocage exec sonarr service sonarr start

0
tautulli.sh → install/tautulli.sh Executable file → Normal file
View File

3
update-all.sh Normal file
View File

@ -0,0 +1,3 @@
for f in ./update/*.sh; do
bash "$f" -H
done

9
update/jackett.sh Normal file
View File

@ -0,0 +1,9 @@
iocage exec jackett service jackett stop
iocage exec jackett pkg update -y && pkg upgrade -y
iocage exec jackett "fetch https://github.com/Jackett/Jackett/releases/download/v0.11.502/Jackett.Binaries.Mono.tar.gz -o /usr/local/share"
iocage exec jackett "tar -xzvf /usr/local/share/Jackett.Binaries.Mono.tar.gz -C /usr/local/share"
iocage exec jackett rm /usr/local/share/Jackett.Binaries.Mono.tar.gz
iocage exec jackett chown -R jackett:jackett /usr/local/share/Jackett /config
cp ../includes/jackett-conf/jackett.rc /mnt/tank/iocage/jails/jackett/root/usr/local/etc/rc.d/jackett
iocage exec jackett chmod u+x /usr/local/etc/rc.d/jackett
iocage exec jackett service jackett start

9
update/lidarr.sh Normal file
View File

@ -0,0 +1,9 @@
iocage exec lidarr service lidarr stop
iocage exec lidarr pkg update -y && pkg upgrade -y
iocage exec lidarr "fetch https://github.com/lidarr/Lidarr/releases/download/v0.2.0.371/Lidarr.develop.0.2.0.371.linux.tar.gz -o /usr/local/share"
iocage exec lidarr "tar -xzvf /usr/local/share/v0.2.0.371/Lidarr.develop.0.2.0.371.linux.tar.gz -C /usr/local/share"
iocage exec lidarr "rm /usr/local/share/v0.2.0.371/Lidarr.develop.0.2.0.371.linux.tar.gz"
iocage exec lidarr chown -R lidarr:lidarr /usr/local/share/Lidarr /config
cp ../includes/lidarr-conf/lidarr.rc /mnt/tank/iocage/jails/lidarr/root/usr/local/etc/rc.d/lidarr
iocage exec lidarr chmod u+x /usr/local/etc/rc.d/lidarr
iocage exec lidarr service lidarr start

11
update/organizr.sh Normal file
View File

@ -0,0 +1,11 @@
iocage exec organizr service nginx stop
iocage exec organizr service php-fpm stop
iocage exec organizr pkg update -y && pkg upgrade -y
mv /mnt/tank/iocage/jails/organizr/root/usr/local/etc/nginx/nginx.conf /mnt/tank/iocage/jails/organizr/root/usr/local/etc/nginx/nginx.conf.bak
cp ../includes/organizr-conf/nginx.conf /mnt/tank/iocage/jails/organizr/root/usr/local/etc/nginx/nginx.conf
cp ../includes/organizr-conf/custom /mnt/tank/iocage/jails/organizr/root/usr/local/etc/nginx/custom
iocage exec tautulli cd /usr/local/www/Organizr
iocage exec organizr git pull
iocage exec organizr chown -R www:www /usr/local/www /config /usr/local/etc/nginx/nginx.conf /usr/local/etc/nginx/custom
iocage exec organizr service nginx start
iocage exec organizr service php-fpm start

12
update/plex.sh Normal file
View File

@ -0,0 +1,12 @@
iocage exec plex service plexmediaserver_plexpass stop
iocage exec plex pkg update -y && pkg upgrade -y
iocage exec plex chown -R plex:plex /usr/local/share/plexmediaserver-plexpass/
iocage exec plex service plexmediaserver_plexpass start
sleep 10s
echo "Waiting 20s to stop plex"
iocage stop plex
sleep 10s
echo "Waiting 20s to start plex"
iocage start plex
iocage exec plex service plexmediaserver_plexpass start
echo "Finished installing plex"

9
update/radarr.sh Normal file
View File

@ -0,0 +1,9 @@
iocage exec radarr service radarr stop
iocage exec radarr pkg update -y && pkg upgrade -y
iocage exec radarr "fetch https://github.com/Radarr/Radarr/releases/download/v0.2.0.1480/Radarr.develop.0.2.0.1480.linux.tar.gz -o /usr/local/share"
iocage exec radarr "tar -xzvf /usr/local/share/Radarr.develop.0.2.0.1480.linux.tar.gz -C /usr/local/share"
iocage exec radarr rm /usr/local/share/Radarr.develop.0.2.0.1480.linux.tar.gz
iocage exec radarr chown -R radarr:radarr /usr/local/share/Radarr /config
cp ../includes/radarr-conf/radarr.rc /mnt/tank/iocage/jails/radarr/root/usr/local/etc/rc.d/radarr
iocage exec radarr chmod u+x /usr/local/etc/rc.d/radarr
iocage exec radarr service radarr start

9
update/sonarr.sh Normal file
View File

@ -0,0 +1,9 @@
iocage exec sonarr service sonarr stop
iocage exec sonarr pkg update -y && pkg upgrade -y
iocage exec sonarr "fetch http://download.sonarr.tv/v2/master/mono/NzbDrone.master.tar.gz -o /usr/local/share"
iocage exec sonarr "tar -xzvf /usr/local/share/NzbDrone.master.tar.gz -C /usr/local/share"
iocage exec sonarr rm /usr/local/share/NzbDrone.master.tar.gz
iocage exec sonarr chown -R sonarr:sonarr /usr/local/share/NzbDrone /config
cp ../includes/sonarr-conf/sonarr.rc /mnt/tank/iocage/jails/sonarr/root/usr/local/etc/rc.d/sonarr
iocage exec sonarr chmod u+x /usr/local/etc/rc.d/sonarr
iocage exec sonarr service sonarr start

8
update/tautulli.sh Normal file
View File

@ -0,0 +1,8 @@
iocage exec tautulli service tautulli stop
iocage exec tautulli pkg update -y && pkg upgrade -y
iocage exec tautulli cd /usr/local/share/Tautulli
iocage exec tautulli git pull
iocage exec tautulli chown -R tautulli:tautulli /usr/local/share/Tautulli /config
iocage exec tautulli cp /usr/local/share/Tautulli/init-scripts/init.freenas /usr/local/etc/rc.d/tautulli
iocage exec tautulli chmod u+x /usr/local/etc/rc.d/tautulli
iocage exec tautulli service tautulli start