From 16cc33e37ba96b9e58396f6343db332094cd42c7 Mon Sep 17 00:00:00 2001 From: kjeld Schouten-Lebbing Date: Thu, 27 Feb 2020 19:58:24 +0100 Subject: [PATCH] Restructure and add update scripts --- {jackett-conf => includes/jackett-conf}/jackett.rc | 0 {lidarr-conf => includes/lidarr-conf}/lidarr.rc | 0 .../organizr-conf}/custom/organizr.conf | 0 .../organizr-conf}/custom/phpblock.conf | 0 {organizr-conf => includes/organizr-conf}/nginx.conf | 0 {plex-conf => includes/plex-conf}/FreeBSD.conf | 0 {radarr-conf => includes/radarr-conf}/radarr.rc | 0 {sonarr-conf => includes/sonarr-conf}/sonarr.rc | 0 jackett.sh => install/jackett.sh | 2 +- lidarr.sh => install/lidarr.sh | 2 +- organizr.sh => install/organizr.sh | 4 ++-- plex.sh => install/plex.sh | 2 +- radarr.sh => install/radarr.sh | 2 +- sonarr.sh => install/sonarr.sh | 2 +- tautulli.sh => install/tautulli.sh | 0 update-all.sh | 3 +++ update/jackett.sh | 9 +++++++++ update/lidarr.sh | 9 +++++++++ update/organizr.sh | 11 +++++++++++ update/plex.sh | 12 ++++++++++++ update/radarr.sh | 9 +++++++++ update/sonarr.sh | 9 +++++++++ update/tautulli.sh | 8 ++++++++ 23 files changed, 77 insertions(+), 7 deletions(-) rename {jackett-conf => includes/jackett-conf}/jackett.rc (100%) rename {lidarr-conf => includes/lidarr-conf}/lidarr.rc (100%) rename {organizr-conf => includes/organizr-conf}/custom/organizr.conf (100%) rename {organizr-conf => includes/organizr-conf}/custom/phpblock.conf (100%) rename {organizr-conf => includes/organizr-conf}/nginx.conf (100%) rename {plex-conf => includes/plex-conf}/FreeBSD.conf (100%) rename {radarr-conf => includes/radarr-conf}/radarr.rc (100%) rename {sonarr-conf => includes/sonarr-conf}/sonarr.rc (100%) rename jackett.sh => install/jackett.sh (91%) mode change 100755 => 100644 rename lidarr.sh => install/lidarr.sh (93%) mode change 100755 => 100644 rename organizr.sh => install/organizr.sh (90%) mode change 100755 => 100644 rename plex.sh => install/plex.sh (91%) mode change 100755 => 100644 rename radarr.sh => install/radarr.sh (93%) mode change 100755 => 100644 rename sonarr.sh => install/sonarr.sh (93%) mode change 100755 => 100644 rename tautulli.sh => install/tautulli.sh (100%) mode change 100755 => 100644 create mode 100644 update-all.sh create mode 100644 update/jackett.sh create mode 100644 update/lidarr.sh create mode 100644 update/organizr.sh create mode 100644 update/plex.sh create mode 100644 update/radarr.sh create mode 100644 update/sonarr.sh create mode 100644 update/tautulli.sh diff --git a/jackett-conf/jackett.rc b/includes/jackett-conf/jackett.rc similarity index 100% rename from jackett-conf/jackett.rc rename to includes/jackett-conf/jackett.rc diff --git a/lidarr-conf/lidarr.rc b/includes/lidarr-conf/lidarr.rc similarity index 100% rename from lidarr-conf/lidarr.rc rename to includes/lidarr-conf/lidarr.rc diff --git a/organizr-conf/custom/organizr.conf b/includes/organizr-conf/custom/organizr.conf similarity index 100% rename from organizr-conf/custom/organizr.conf rename to includes/organizr-conf/custom/organizr.conf diff --git a/organizr-conf/custom/phpblock.conf b/includes/organizr-conf/custom/phpblock.conf similarity index 100% rename from organizr-conf/custom/phpblock.conf rename to includes/organizr-conf/custom/phpblock.conf diff --git a/organizr-conf/nginx.conf b/includes/organizr-conf/nginx.conf similarity index 100% rename from organizr-conf/nginx.conf rename to includes/organizr-conf/nginx.conf diff --git a/plex-conf/FreeBSD.conf b/includes/plex-conf/FreeBSD.conf similarity index 100% rename from plex-conf/FreeBSD.conf rename to includes/plex-conf/FreeBSD.conf diff --git a/radarr-conf/radarr.rc b/includes/radarr-conf/radarr.rc similarity index 100% rename from radarr-conf/radarr.rc rename to includes/radarr-conf/radarr.rc diff --git a/sonarr-conf/sonarr.rc b/includes/sonarr-conf/sonarr.rc similarity index 100% rename from sonarr-conf/sonarr.rc rename to includes/sonarr-conf/sonarr.rc diff --git a/jackett.sh b/install/jackett.sh old mode 100755 new mode 100644 similarity index 91% rename from jackett.sh rename to install/jackett.sh index 511597d0..007f9917 --- a/jackett.sh +++ b/install/jackett.sh @@ -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 \ No newline at end of file diff --git a/lidarr.sh b/install/lidarr.sh old mode 100755 new mode 100644 similarity index 93% rename from lidarr.sh rename to install/lidarr.sh index cca1a347..1bc44173 --- a/lidarr.sh +++ b/install/lidarr.sh @@ -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 \ No newline at end of file diff --git a/organizr.sh b/install/organizr.sh old mode 100755 new mode 100644 similarity index 90% rename from organizr.sh rename to install/organizr.sh index 8b7f8779..eb0cd1e9 --- a/organizr.sh +++ b/install/organizr.sh @@ -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 diff --git a/plex.sh b/install/plex.sh old mode 100755 new mode 100644 similarity index 91% rename from plex.sh rename to install/plex.sh index 6cb88c54..42eac7de --- a/plex.sh +++ b/install/plex.sh @@ -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 diff --git a/radarr.sh b/install/radarr.sh old mode 100755 new mode 100644 similarity index 93% rename from radarr.sh rename to install/radarr.sh index dff0d8d1..9a4facad --- a/radarr.sh +++ b/install/radarr.sh @@ -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 \ No newline at end of file diff --git a/sonarr.sh b/install/sonarr.sh old mode 100755 new mode 100644 similarity index 93% rename from sonarr.sh rename to install/sonarr.sh index 078f8600..4ef3722f --- a/sonarr.sh +++ b/install/sonarr.sh @@ -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 \ No newline at end of file diff --git a/tautulli.sh b/install/tautulli.sh old mode 100755 new mode 100644 similarity index 100% rename from tautulli.sh rename to install/tautulli.sh diff --git a/update-all.sh b/update-all.sh new file mode 100644 index 00000000..9cb5f85b --- /dev/null +++ b/update-all.sh @@ -0,0 +1,3 @@ +for f in ./update/*.sh; do + bash "$f" -H +done \ No newline at end of file diff --git a/update/jackett.sh b/update/jackett.sh new file mode 100644 index 00000000..373f6107 --- /dev/null +++ b/update/jackett.sh @@ -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 \ No newline at end of file diff --git a/update/lidarr.sh b/update/lidarr.sh new file mode 100644 index 00000000..713c5f8c --- /dev/null +++ b/update/lidarr.sh @@ -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 \ No newline at end of file diff --git a/update/organizr.sh b/update/organizr.sh new file mode 100644 index 00000000..983d06f2 --- /dev/null +++ b/update/organizr.sh @@ -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 \ No newline at end of file diff --git a/update/plex.sh b/update/plex.sh new file mode 100644 index 00000000..546f0646 --- /dev/null +++ b/update/plex.sh @@ -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" \ No newline at end of file diff --git a/update/radarr.sh b/update/radarr.sh new file mode 100644 index 00000000..e8c4befa --- /dev/null +++ b/update/radarr.sh @@ -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 \ No newline at end of file diff --git a/update/sonarr.sh b/update/sonarr.sh new file mode 100644 index 00000000..df1e3f8c --- /dev/null +++ b/update/sonarr.sh @@ -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 \ No newline at end of file diff --git a/update/tautulli.sh b/update/tautulli.sh new file mode 100644 index 00000000..85105f40 --- /dev/null +++ b/update/tautulli.sh @@ -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 \ No newline at end of file