From f0213ad96bacc06a3ea0ec337d71fab713982ce3 Mon Sep 17 00:00:00 2001 From: Igor Date: Tue, 24 Dec 2024 22:20:44 +0100 Subject: [PATCH] Adjust software module options to match recent changes (#332) * Bazarr: adjust module options to match changes * Deluge: adjust module options to match changes * Docker: adjust module options to match changes * Emby server: adjust module options to match changes * HAOS: adjust module options to match changes * OpenHab: adjust module options to match changes * qbittorrent: adjust module options to match changes * Transmission: adjust module options to match changes * sabnzbd: adjust module options to match changes * Medusa: adjust module options to match changes * Sonarr: adjust module options to match changes * Radarr: adjust module options to match changes * Lidarr and Readarr: adjust module options to match changes * SWAG: adjust module options to match changes * Jellyserr and Mariadb: adjust module options to match changes * Nextcloud and Netdata: adjust module options to match changes * Owncloud and Phpmyadmin: adjust module options to match changes * Pi-hole and Prowlarr: adjust module options to match changes * Sirling and Uptime kuma: adjust module options to match changes * Syncthing and watchtower: adjust module options to match changes * Portainer and Webmin: adjust module options to match changes * Several minor fixes --- tests/{HA001.conf => HAB001.conf} | 0 .../include/images/{DOW019.png => BAZ001.png} | Bin .../include/images/{DOW003.png => DEL001.png} | Bin .../include/images/{DOW040.png => JEL001.png} | Bin .../include/images/{DOW021.png => LID001.png} | Bin .../include/images/{DOW013.png => MED001.png} | Bin tools/include/images/MED003.png | Bin 0 -> 4931 bytes .../include/images/{DOW017.png => RAD001.png} | Bin .../include/images/{DOW023.png => RDR001.png} | Bin .../include/images/{DOW011.png => SABN01.png} | Bin .../include/images/{DOW015.png => SON001.png} | Bin .../include/images/{DOW005.png => TRA001.png} | Bin .../{DOW019-footer.md => BAZ001-footer.md} | 0 .../{DOW019-header.md => BAZ001-header.md} | 0 .../{DOW003-footer.md => DEL001-footer.md} | 0 .../{DOW003-header.md => DEL001-header.md} | 0 tools/include/markdown/HA003-header.md | 2 +- .../{DOW040-header.md => JEL001-header.md} | 0 .../{DOW021-footer.md => LID001-footer.md} | 0 .../{DOW021-header.md => LID001-header.md} | 0 .../{DOW013-footer.md => MDS001-footer.md} | 0 .../{DOW013-header.md => MDS001-header.md} | 0 tools/include/markdown/MED003-footer.md | 17 + tools/include/markdown/MED003-header.md | 1 + .../{DOW017-footer.md => RAD001-footer.md} | 0 .../{DOW017-header.md => RAD001-header.md} | 0 .../{DOW023-footer.md => RDR001-footer.md} | 0 .../{DOW023-header.md => RDR001-header.md} | 0 .../{DOW011-footer.md => SABN01-footer.md} | 0 .../{DOW011-header.md => SABN01-header.md} | 0 .../{DOW015-footer.md => SON001-footer.md} | 0 .../{DOW015-header.md => SON001-header.md} | 0 .../{DOW005-footer.md => TRA001-footer.md} | 0 .../{DOW005-header.md => TRA001-header.md} | 0 tools/json/config.software.json | 782 +++++++++++------- tools/json/config.system.json | 22 + .../functions/set_runtime_variables.sh | 1 + tools/modules/runtime/config.runtime.sh | 52 +- tools/modules/software/install_docker.sh | 41 - tools/modules/software/install_embyserver.sh | 23 - tools/modules/software/install_openhab.sh | 45 - tools/modules/software/install_pi-hole.sh | 101 --- .../software/install_plexmediaserver.sh | 24 - tools/modules/software/install_portainer.sh | 60 -- .../{install_bazarr.sh => module_bazarr.sh} | 24 +- .../{install_deluge.sh => module_deluge.sh} | 23 +- tools/modules/software/module_docker.sh | 94 +++ tools/modules/software/module_embyserver.sh | 87 ++ .../{install_haos.sh => module_haos.sh} | 81 +- ...all_jellyseerr.sh => module_jellyseerr.sh} | 15 +- .../{install_lidarr.sh => module_lidarr.sh} | 22 +- .../{install_mariadb.sh => module_mariadb.sh} | 18 +- .../{install_medusa.sh => module_medusa.sh} | 23 +- .../{install_netdata.sh => module_netdata.sh} | 19 +- ...stall_nextcloud.sh => module_nextcloud.sh} | 17 +- tools/modules/software/module_openhab.sh | 66 ++ ...install_owncloud.sh => module_owncloud.sh} | 15 +- ...all_phpmyadmin.sh => module_phpmyadmin.sh} | 17 +- tools/modules/software/module_pi-hole.sh | 115 +++ .../software/module_plexmediaserver.sh | 64 ++ tools/modules/software/module_portainer.sh | 85 ++ ...install_prowlarr.sh => module_prowlarr.sh} | 24 +- ...l_qbittorrent.sh => module_qbittorrent.sh} | 27 +- .../{install_radarr.sh => module_radarr.sh} | 21 +- .../{install_readarr.sh => module_readarr.sh} | 24 +- .../{install_sabnzbd.sh => module_sabnzbd.sh} | 24 +- .../{install_sonarr.sh => module_sonarr.sh} | 22 +- ...install_stirling.sh => module_stirling.sh} | 17 +- .../{install_swag.sh => module_swag.sh} | 11 +- ...stall_syncthing.sh => module_syncthing.sh} | 17 +- ...transmission.sh => module_transmission.sh} | 32 +- ...l_uptime-kuma.sh => module_uptime-kuma.sh} | 18 +- ...all_watchtower.sh => module_watchtower.sh} | 12 +- .../{install_webmin.sh => module_webmin.sh} | 18 +- 74 files changed, 1412 insertions(+), 811 deletions(-) rename tests/{HA001.conf => HAB001.conf} (100%) rename tools/include/images/{DOW019.png => BAZ001.png} (100%) rename tools/include/images/{DOW003.png => DEL001.png} (100%) rename tools/include/images/{DOW040.png => JEL001.png} (100%) rename tools/include/images/{DOW021.png => LID001.png} (100%) rename tools/include/images/{DOW013.png => MED001.png} (100%) create mode 100644 tools/include/images/MED003.png rename tools/include/images/{DOW017.png => RAD001.png} (100%) rename tools/include/images/{DOW023.png => RDR001.png} (100%) rename tools/include/images/{DOW011.png => SABN01.png} (100%) rename tools/include/images/{DOW015.png => SON001.png} (100%) rename tools/include/images/{DOW005.png => TRA001.png} (100%) rename tools/include/markdown/{DOW019-footer.md => BAZ001-footer.md} (100%) rename tools/include/markdown/{DOW019-header.md => BAZ001-header.md} (100%) rename tools/include/markdown/{DOW003-footer.md => DEL001-footer.md} (100%) rename tools/include/markdown/{DOW003-header.md => DEL001-header.md} (100%) rename tools/include/markdown/{DOW040-header.md => JEL001-header.md} (100%) rename tools/include/markdown/{DOW021-footer.md => LID001-footer.md} (100%) rename tools/include/markdown/{DOW021-header.md => LID001-header.md} (100%) rename tools/include/markdown/{DOW013-footer.md => MDS001-footer.md} (100%) rename tools/include/markdown/{DOW013-header.md => MDS001-header.md} (100%) create mode 100644 tools/include/markdown/MED003-footer.md create mode 100644 tools/include/markdown/MED003-header.md rename tools/include/markdown/{DOW017-footer.md => RAD001-footer.md} (100%) rename tools/include/markdown/{DOW017-header.md => RAD001-header.md} (100%) rename tools/include/markdown/{DOW023-footer.md => RDR001-footer.md} (100%) rename tools/include/markdown/{DOW023-header.md => RDR001-header.md} (100%) rename tools/include/markdown/{DOW011-footer.md => SABN01-footer.md} (100%) rename tools/include/markdown/{DOW011-header.md => SABN01-header.md} (100%) rename tools/include/markdown/{DOW015-footer.md => SON001-footer.md} (100%) rename tools/include/markdown/{DOW015-header.md => SON001-header.md} (100%) rename tools/include/markdown/{DOW005-footer.md => TRA001-footer.md} (100%) rename tools/include/markdown/{DOW005-header.md => TRA001-header.md} (100%) delete mode 100644 tools/modules/software/install_docker.sh delete mode 100644 tools/modules/software/install_embyserver.sh delete mode 100644 tools/modules/software/install_openhab.sh delete mode 100644 tools/modules/software/install_pi-hole.sh delete mode 100644 tools/modules/software/install_plexmediaserver.sh delete mode 100644 tools/modules/software/install_portainer.sh rename tools/modules/software/{install_bazarr.sh => module_bazarr.sh} (80%) rename tools/modules/software/{install_deluge.sh => module_deluge.sh} (81%) create mode 100644 tools/modules/software/module_docker.sh create mode 100644 tools/modules/software/module_embyserver.sh rename tools/modules/software/{install_haos.sh => module_haos.sh} (70%) rename tools/modules/software/{install_jellyseerr.sh => module_jellyseerr.sh} (85%) rename tools/modules/software/{install_lidarr.sh => module_lidarr.sh} (81%) rename tools/modules/software/{install_mariadb.sh => module_mariadb.sh} (89%) rename tools/modules/software/{install_medusa.sh => module_medusa.sh} (81%) rename tools/modules/software/{install_netdata.sh => module_netdata.sh} (86%) rename tools/modules/software/{install_nextcloud.sh => module_nextcloud.sh} (85%) create mode 100644 tools/modules/software/module_openhab.sh rename tools/modules/software/{install_owncloud.sh => module_owncloud.sh} (86%) rename tools/modules/software/{install_phpmyadmin.sh => module_phpmyadmin.sh} (85%) create mode 100644 tools/modules/software/module_pi-hole.sh create mode 100644 tools/modules/software/module_plexmediaserver.sh create mode 100644 tools/modules/software/module_portainer.sh rename tools/modules/software/{install_prowlarr.sh => module_prowlarr.sh} (79%) rename tools/modules/software/{install_qbittorrent.sh => module_qbittorrent.sh} (77%) rename tools/modules/software/{install_radarr.sh => module_radarr.sh} (82%) rename tools/modules/software/{install_readarr.sh => module_readarr.sh} (80%) rename tools/modules/software/{install_sabnzbd.sh => module_sabnzbd.sh} (80%) rename tools/modules/software/{install_sonarr.sh => module_sonarr.sh} (81%) rename tools/modules/software/{install_stirling.sh => module_stirling.sh} (86%) rename tools/modules/software/{install_swag.sh => module_swag.sh} (91%) rename tools/modules/software/{install_syncthing.sh => module_syncthing.sh} (85%) rename tools/modules/software/{install_transmission.sh => module_transmission.sh} (71%) rename tools/modules/software/{install_uptime-kuma.sh => module_uptime-kuma.sh} (83%) rename tools/modules/software/{install_watchtower.sh => module_watchtower.sh} (87%) rename tools/modules/software/{install_webmin.sh => module_webmin.sh} (89%) diff --git a/tests/HA001.conf b/tests/HAB001.conf similarity index 100% rename from tests/HA001.conf rename to tests/HAB001.conf diff --git a/tools/include/images/DOW019.png b/tools/include/images/BAZ001.png similarity index 100% rename from tools/include/images/DOW019.png rename to tools/include/images/BAZ001.png diff --git a/tools/include/images/DOW003.png b/tools/include/images/DEL001.png similarity index 100% rename from tools/include/images/DOW003.png rename to tools/include/images/DEL001.png diff --git a/tools/include/images/DOW040.png b/tools/include/images/JEL001.png similarity index 100% rename from tools/include/images/DOW040.png rename to tools/include/images/JEL001.png diff --git a/tools/include/images/DOW021.png b/tools/include/images/LID001.png similarity index 100% rename from tools/include/images/DOW021.png rename to tools/include/images/LID001.png diff --git a/tools/include/images/DOW013.png b/tools/include/images/MED001.png similarity index 100% rename from tools/include/images/DOW013.png rename to tools/include/images/MED001.png diff --git a/tools/include/images/MED003.png b/tools/include/images/MED003.png new file mode 100644 index 0000000000000000000000000000000000000000..a6b258bf1490e3c2a98b90226e453073a314eeeb GIT binary patch literal 4931 zcmZ{I3p7-1^!J%#7()yr_sfhiGL_4?l_Z14y)uM|BIOq0MN!6>8RVLbTym$2Na0N> zN;4=gFDku4Ni(AeU5s3sH26;ITkBivTmSW6XPxsrXYb$M`#itB_H#K|ltYd(Qfg8F z0LVBykv*W6^XHb7fSw-jBN0%8J?Z3e5CAT00|0s&0IWeG`YZsPB?7>FAOKii1pwuk ziVk-xNFfpA>PQAQ|6Dblx2`}EM7;Asd&Fl+DYVIUf&~i#p>>?eww{UazE%20`i~`N zu(j=7aKQt0-n|Wn2eJ?QdEneVZnj0StQFH4Rw~J1C*Wapv$IomG4DFs(6_?T51q@} zoQHc4F|NtvV=vR{$^Uws^8J7tKB{?yb>^*cL*@SLy?abQ#nhofWzC;d@FNrUe15-q zOZi9k!1Un4~zJaYQa?wMj`BxkcDIymbZni0m#r0;Gsr zNl+yc)gBEknKNN#j>%vX54ovO-$>irvSmE|wEQ8U^f#vcvNWkvWo5f`Ch(Mk6S>ub z&EXQ~l=3tYA!N{04yJY^TM$78#pGdXH5UaD_u&QvWQaX8%$b}Fws|-TbNT_USQV^p z*;Z9s3KI^Sujvw`?#NA1c!RD0LSQ${B{A|f4pd2Yohl0(drGTDBD z0XQ3ZiS&TO@6k>tG@uulSWoltZ)6!|Qk%trvYso;c4*c_BdOa~K_5BVkVzm4$7p_b z6v*jrmWQNmppOdek`qto@2#AvKb%x&RsynV0Xk@*%^i3QL8Qj2u?^Cpr}D=#;WBbL z2Nz{C*jLR2$9NN*`_=^YZza9Il(5_Qh&Sl3_Qyspu=e$O@$Uo1Qfvo&y?p5I=ZF@@ zq|)+Cr5^I!Ql5gvTM+&T62zadLOg+;x~WLG6bCv9KMzmVYT#^rE6~`q$GgWJq;XvZ z7CJU?_3<;dcpp%21{P%T?l5XQ&#%6nX*ROUkuu-E%W%-xha`pPHR&p$b3o%Ex=}n|FqT`)i>~(oUv4hIXh3|?uaqw>-T*RX@(#JvTTxe_!IiPfxiHIZ z<>Z+JgerQE0%%&mRfoIkYoVUWEj4Zn$Q45#X?w?y>)$;V#d&wE15X|dJSL6h|Gc#8 z-}~??K>~knb?bPJm;uAffSyK@Q+fcmkB7ai{qE#0+vo>I%)sy>#xQe7R2;_{>u2#) zOsMUef#LOV^ysD>nU;vfN=0bwVz+#l$9XW%pCQpj+~~XT-UJ3-RBM71q2}i|12wtP z#}fL&AWz;wMetrJEdQZe1fJ*tAlV8&+Kj&-2bJB4$Xv8d_X6I*HE`-cjQZk-{%N%& z_bcHJFI372oM^F>tTe9fY7Kr|Yb7hu*qy$cz9|uM&04OcP=3; z+wR>wxideIScI=U=p4aAC5TN(QoxgNqOpkL3k+!vES&oN&hY!O&eFNBX8X4{pr|+s zGFPtV*&*V|s;?e*ftnfVU2SJyKZsIRpV+Hfs(J!%YIl4-)d6{c*(Xj=p#4GR0A-^y z-rw7k750vPJLToNw?Dq1|E;sle5!;bndu}hh)>FuCXMLP>(2P9|4fKH5%JG1&t#&F zWqI*v4UJlYMZ=(ZITM;z-BNCk39Zsk@H2Yhz}e?)FATM?0s628{9Au-ay=?QSMnGg zE&aaA?hJExY*FZSFl^>a>dNEU$Sj!fm$opuRlq1( z7dPp>fRel`PUu+kQ>3x|0HdXqF3s}N7l(`s)e6^Yc72zy&b!cNdvDYmyA>8GLxLLt z?{A~dHF1Y}#a9@E7*FR(G~AFr#LtL7{zfuo2o=ql_ zy+@V3u5Ckt@|+^U{&+B~41F-ZEdff@?mvk#7(v|I40OI-%t?UxOOeP%^t!}k_oT)V zgcs$F6{8t^q(mb+0tfwEAHPd!3E6r6$LVC&2x7XPz=#GPsnCdS0L7LacOEe@Hn$dd zbO!Zr>kar*N#1E;*8!N>P*#ZL1c^M>aV#>7+ZPjZ)!jG1Gy5LeOrJi$N3@E+y1(n; zy}8w-w|_U~tp4F$>_BkvCL^N&ZHA|R;Uo4!bSTfD+TtU19glx=tGcp|u!jhVf=$WM zT3i9b2x6yaa?H#5q|&O&AcDb)t-Lh8-j)6+4f9pO#x&qhI@j7{w%p249msV_u6d+B z4pub#(k;?4Ulncsd-wj|x;N$0Uvl259FQRvRf0hQ7%E)&pbVbrC+woZ%)S|Xi}Y>% zQym3*jwVHTg@rYqCU38owA?>})V(0RV=Cd!Y~b&X%J;2n$Lm7$9+hfkpG+1Q3hZk_ zeQ!4Fw_Y+<;wKap*D0NAnt1-tccF@2l&C^^EooML)60KUxl>vsE-y1$S9?6{>tbWkmj{V zyXp6!7Uck?QAD{nci_|4G}k3W^!4r(GUnA~?vCyBZxbr(ctbF3S;Tl(?e7y{W{O@3 zH}4kbNpswjYlLs(a-wo@d}YA8#$DoYKm7Veb7VJ-lR3Ya`^B%@plL9y zX$k);Z+pk@)ur#V6Q|H9J&0!P1+%uCtdO9E^NsE zUF_~9ti{^+>$Ru(`ImS6%Noc?oSt`me}Ic;Iay$6^kDQxqN%lM@0YQF=~p+k4Bh;3 zZXZT@`!De`{ElIfDT7x_2V&06ZrPXoyPYU3eOMY5N+9N_Z$rhA@HR|xwXY@Gt*5**`T ziMf{DC>OeS%fm^99j3;nFBa9C<7Pcj>mQRp#e@u(%Wk@^*%449I=9ud zUG;;8m~6ZX7d74Di=$Q%S((raruJ%?#lJK@Ph>8(Q7pE zG`}r35qr)}6O4}U8RU$}DF6QT9IiwY=w}$}beW7qsj;v@b*=wBF^;K7O-3Z9eBC$m zBhC@>=Ek~8R;E7y2@p-|ZfGqbjA&Y7dpjBC>| z#d0>AK`gAl$J?!XSM)5#6X;N~3x4lma0Wi-te*r{ziae4d-*zI@wd zdZV?$VtFYCxlcq%2cGNcpy55!{jM5MPZR6vUiVpRIKEd6*> zViEgGZmg~e{Cn=RvVyO$)&b@+0#6ALs#Z6zgg!4__AmRd|4RJNbt7d*?g_))pQm1@ zpUyNBQ5?hep`mSy0aYLEi7k1#_@Yl7%6^RH`2tUVn+}?0KhDpv6#K#o+`_8C9l6!C zHEM5cE`NE*Vs$CU7$vZ7Se&y zyw&=g1Cwg~GU?<(Yzw>mikRL^v=L#lQd|W?ldO-JVg;%QP3E8OuYT@K_`j^Ta`+c3Kki zg4V+edIAIe0<2qA-n3?9*hJs&lM6%Kb7VrlJugnh>_tEphwJ=Oy2g*W3C>*G_}Hjz z%VZ5ovNfz@+gyQ;YNKOSQX&a~ev2PQungqtj3kV#e$S_v zhf=Q8=&isGKenq4cHV ze#^`|unnZ}@D1G*S;W4fSr%a^%6pwY1%=?s45iHO0@Wv)0HiCq@SILJI>81e!O9ZKVqJ z>+H}K*cGWj;sHPosnIPIq%uGb4mo;#+ko|%`Cn2wEjUqNObr=~n6qE`bqPgMd4E^% zB+QwItdb_vutuBBx>J^d!+YtBzW8h2^E z`Pzpk53g-J)}J;j&cNtvdgvRI*OGZ|Qq{K@DXYG_Bfefev>T-)4dmESm3Q<_7A~ynudL&2gDa#+ zK88RcH{{4Sbsei86>xX3jMQiCHH-MvdQ?7WGHj38ym!;UFrSHz?3 zUE70HX!(YeHx^dp)9VE@4sx*599v|NCImU%tBnl8K%Mz+7!ofMC(|we_5qP8@+MNA zdch7E2iViuY24KNfXq}lk|uptx>(b_`Ur&7m4i_^I$g&-6Z-JTpgsLwGB~=MiasMP z1xW@l#uUhhI2owkuH6;KS(Q9Atv}!HkKWMDcgI#QrX3(@&HDGcfN&=`+DRBehD)kkh9^-_mp*85nhOMD3`sdq+X>5WR*=Wy!9tsE zE_Bk*gku?LY+Eutf6*O8vQe3UJTDcFrd8)>wMYumyhulW`WJC&vPgC`6iNH+phCrd zgYaU(?=(p{V{@k%NU@L!NKn$@pYsI><_OdcflZcne-32{5Et(Q5`1Xnm~jME-QqUN zMYuk_32Pu_N42()`k+5Zy7Bft@uyD22V0(u4Tc)PglJ-FK(sJ0CVCoMSeg?pP0e=_ ziIzm-Fsd>9|1&rfeJVWU{QquH:8096` + +=== "Directories" + + - Install directory: `/armbian/emby` + - Site configuration directory: `/armbian/emby/config` + - Data directory: `/armbian/emby/tvshows` `/armbian/emby/movies` + +=== "View logs" + + ```sh + docker logs -f emby + ``` diff --git a/tools/include/markdown/MED003-header.md b/tools/include/markdown/MED003-header.md new file mode 100644 index 000000000..cc4b9f35f --- /dev/null +++ b/tools/include/markdown/MED003-header.md @@ -0,0 +1 @@ +Emby organizes video, music, live TV, and photos from personal media libraries and streams them to smart TVs, streaming boxes and mobile devices. This container is packaged as a standalone emby Media Server. diff --git a/tools/include/markdown/DOW017-footer.md b/tools/include/markdown/RAD001-footer.md similarity index 100% rename from tools/include/markdown/DOW017-footer.md rename to tools/include/markdown/RAD001-footer.md diff --git a/tools/include/markdown/DOW017-header.md b/tools/include/markdown/RAD001-header.md similarity index 100% rename from tools/include/markdown/DOW017-header.md rename to tools/include/markdown/RAD001-header.md diff --git a/tools/include/markdown/DOW023-footer.md b/tools/include/markdown/RDR001-footer.md similarity index 100% rename from tools/include/markdown/DOW023-footer.md rename to tools/include/markdown/RDR001-footer.md diff --git a/tools/include/markdown/DOW023-header.md b/tools/include/markdown/RDR001-header.md similarity index 100% rename from tools/include/markdown/DOW023-header.md rename to tools/include/markdown/RDR001-header.md diff --git a/tools/include/markdown/DOW011-footer.md b/tools/include/markdown/SABN01-footer.md similarity index 100% rename from tools/include/markdown/DOW011-footer.md rename to tools/include/markdown/SABN01-footer.md diff --git a/tools/include/markdown/DOW011-header.md b/tools/include/markdown/SABN01-header.md similarity index 100% rename from tools/include/markdown/DOW011-header.md rename to tools/include/markdown/SABN01-header.md diff --git a/tools/include/markdown/DOW015-footer.md b/tools/include/markdown/SON001-footer.md similarity index 100% rename from tools/include/markdown/DOW015-footer.md rename to tools/include/markdown/SON001-footer.md diff --git a/tools/include/markdown/DOW015-header.md b/tools/include/markdown/SON001-header.md similarity index 100% rename from tools/include/markdown/DOW015-header.md rename to tools/include/markdown/SON001-header.md diff --git a/tools/include/markdown/DOW005-footer.md b/tools/include/markdown/TRA001-footer.md similarity index 100% rename from tools/include/markdown/DOW005-footer.md rename to tools/include/markdown/TRA001-footer.md diff --git a/tools/include/markdown/DOW005-header.md b/tools/include/markdown/TRA001-header.md similarity index 100% rename from tools/include/markdown/DOW005-header.md rename to tools/include/markdown/TRA001-header.md diff --git a/tools/json/config.software.json b/tools/json/config.software.json index 5fd32dbb0..0cbbd0db8 100644 --- a/tools/json/config.software.json +++ b/tools/json/config.software.json @@ -6,7 +6,7 @@ "sub": [ { "id": "WebHosting", - "description": "Web hosting", + "description": "Web server, LEMP, reverse proxy, Let's Encrypt SSL", "status": "Stable", "sub": [ { @@ -31,7 +31,7 @@ }, { "id": "SWAG03", - "description": "SWAG reverse proxy remove", + "description": "SWAG remove", "command": [ "module_swag remove" ], @@ -41,13 +41,131 @@ }, { "id": "SWAG04", - "description": "SWAG reverse proxy purge data folder", + "description": "SWAG purge with data folder", "command": [ "module_swag purge" ], "status": "Stable", "author": "@igorpecovnik", - "condition": "! module_swag status && [[ -d \"${SOFTWARE_FOLDER}/swag\" ]]" + "condition": "module_swag status" + } + ] + }, + { + "id": "HomeAutomation", + "description": "Home Automation for monitoring and/or control home appliances", + "sub": [ + { + "id": "HAB001", + "description": "openHAB empowering the smart home", + "about": "This operation will install openHAB.", + "command": [ + "module_openhab install" + ], + "status": "Stable", + "author": "@armbian", + "condition": "! module_openhab status" + }, + { + "id": "HAB002", + "description": "openHAB remove", + "about": "This operation will purge openHAB.", + "command": [ + "module_openhab remove" + ], + "status": "Stable", + "author": "@armbian", + "condition": "module_openhab status" + }, + { + "id": "HAB003", + "description": "openHAB purge with data folder", + "about": "This operation will purge openHAB.", + "command": [ + "module_openhab purge" + ], + "status": "Stable", + "author": "@armbian", + "condition": "module_openhab status" + }, + { + "id": "HAS001", + "description": "Home Assistant open source home automation", + "about": "This operation will install Home Assistant.", + "command": [ + "module_haos install" + ], + "status": "Preview", + "author": "@igorpecovnik", + "condition": "! module_haos status && grep -q bookworm /etc/os-release" + }, + { + "id": "HAS002", + "description": "Home Assistant remove", + "about": "This operation will remove Home Assistant.", + "command": [ + "module_haos remove" + ], + "status": "Preview", + "author": "@igorpecovnik", + "condition": "module_haos status" + }, + { + "id": "HAS003", + "description": "Home Assistant purge with data folder", + "about": "This operation will purge Home Assistant.", + "command": [ + "module_haos purge" + ], + "status": "Preview", + "author": "@igorpecovnik", + "condition": "module_haos status" + } + ] + }, + { + "id": "DNS", + "description": "Network-wide ad blockers servers", + "sub": [ + { + "id": "DNS001", + "description": "Pi-hole DNS ad blocker install", + "command": [ + "module_pi_hole install" + ], + "status": "Stable", + "author": "@armbian", + "condition": "! module_pi_hole status" + }, + { + "id": "DNS003", + "description": "Pi-hole remove", + "command": [ + "module_pi_hole remove" + ], + "status": "Stable", + "author": "@armbian", + "condition": "module_pi_hole status" + }, + { + "id": "DNS002", + "description": "Pi-hole change web admin password", + "command": [ + "module_pi_hole password" + ], + "status": "Stable", + "author": "@armbian", + "condition": "module_pi_hole status" + }, + { + "id": "DNS004", + "description": "Pi-hole purge", + "command": [ + "module_pi_hole remove" + ], + "status": "Stable", + "author": "@armbian", + "condition": "module_pi_hole status" } ] }, @@ -305,272 +423,277 @@ ] }, { - "id": "Netconfig", - "description": "Network tools", + "id": "Downloaders", + "description": "P2P download managers for movies, TV shows, music and subtitles", "sub": [ { - "id": "NET001", - "description": "Install realtime console network usage monitor (nload)", + "id": "DOW001", + "description": "qBittorrent BitTorrent server ", + "about": "This operation will install qBittorrent BitTorrent server", "command": [ - "get_user_continue \"This operation will install nload.\n\nDo you wish to continue?\" process_input", - "pkg_install nload" + "module_qbittorrent install" ], "status": "Stable", "author": "@armbian", - "condition": "! pkg_installed nload" + "condition": "! module_qbittorrent status" }, { - "id": "NET002", - "description": "Remove realtime console network usage monitor (nload)", + "id": "DOW002", + "description": "qBittorrent remove", + "about": "This operation will remove qBittorrent BitTorrent server", "command": [ - "get_user_continue \"This operation will purge nload.\n\nDo you wish to continue?\" process_input", - "pkg_remove nload" + "module_qbittorrent remove" ], "status": "Stable", "author": "@armbian", - "condition": "pkg_installed nload" + "condition": "module_qbittorrent status" }, { - "id": "NET003", - "description": "Install bandwidth measuring tool (iperf3)", + "id": "DOW003", + "description": "qBittorrent purge with data folder", + "about": "This operation will remove qBittorrent BitTorrent data folder", "command": [ - "get_user_continue \"This operation will install iperf3.\n\nDo you wish to continue?\" process_input", - "pkg_install iperf3" + "module_qbittorrent purge" ], "status": "Stable", "author": "@armbian", - "condition": "! pkg_installed iperf3" + "condition": "module_qbittorrent status" }, { - "id": "NET004", - "description": "Remove bandwidth measuring tool (iperf3)", + "id": "DEL001", + "description": "Deluge BitTorrent server", + "about": "This operation will install BitTorrent server", "command": [ - "get_user_continue \"This operation will purge iperf3.\n\nDo you wish to continue?\" process_input", - "pkg_remove iperf3" + "module_deluge install" ], "status": "Stable", "author": "@armbian", - "condition": "pkg_installed iperf3" + "condition": "! module_deluge status" }, { - "id": "NET005", - "description": "Install IP LAN monitor (iptraf-ng)", + "id": "DEL002", + "description": "Deluge remove", + "about": "This operation will remove Deluge BitTorrent server", "command": [ - "get_user_continue \"This operation will install iptraf-ng.\n\nDo you wish to continue?\" process_input", - "pkg_install iptraf-ng" + "module_deluge remove" ], "status": "Stable", "author": "@armbian", - "condition": "! pkg_installed iptraf-ng" + "condition": "module_deluge status" }, { - "id": "NET006", - "description": "Remove IP LAN monitor (iptraf-ng)", + "id": "DEL003", + "description": "Deluge purge with data folder", + "about": "This operation will remove Deluge BitTorrent server data folder", "command": [ - "get_user_continue \"This operation will purge nload.\n\nDo you wish to continue?\" process_input", - "pkg_remove iptraf-ng" + "module_deluge purge" ], "status": "Stable", "author": "@armbian", - "condition": "pkg_installed iptraf-ng" + "condition": "module_deluge status" }, { - "id": "NET007", - "description": "Install hostname broadcast via mDNS (avahi-daemon)", + "id": "TRA001", + "description": "Transmission BitTorrent server", + "about": "This operation will install Transmission BitTorrent server", "command": [ - "get_user_continue \"This operation will install avahi-daemon and add configuration files.\nDo you wish to continue?\" process_input", - "pkg_installed avahi-daemon", - "pkg_install avahi-daemon libnss-mdns", - "cp /usr/share/doc/avahi-daemon/examples/sftp-ssh.service /etc/avahi/services/", - "cp /usr/share/doc/avahi-daemon/examples/ssh.service /etc/avahi/services/", - "service avahi-daemon restart" + "module_transmission install" ], "status": "Stable", "author": "@armbian", - "condition": "! pkg_installed avahi-daemon" + "condition": "! module_transmission status" }, { - "id": "NET008", - "description": "Remove hostname broadcast via mDNS (avahi-daemon)", + "id": "TRA002", + "description": "Transmission remove", + "about": "This operation will remove Transmission BitTorrent server", "command": [ - "get_user_continue \"This operation will purge avahi-daemon \nDo you wish to continue?\" process_input", - "pkg_installed avahi-daemon", - "systemctl stop avahi-daemon avahi-daemon.socket", - "pkg_remove avahi-daemon" + "module_transmission remove" ], "status": "Stable", "author": "@armbian", - "condition": "pkg_installed avahi-daemon" - } - ] - }, - { - "id": "Downloaders", - "description": "Download tools", - "sub": [ + "condition": "module_transmission status" + }, { - "id": "DOW001", - "description": "Install qBittorrent", + "id": "TRA003", + "description": "Transmission purge with data folder", + "about": "This operation will remove Transmission BitTorrent server data folder", "command": [ - "module_qbittorrent install" + "module_transmission purge" ], "status": "Stable", "author": "@armbian", - "condition": "! module_qbittorrent status" + "condition": "module_transmission status" }, { - "id": "DOW002", - "description": "Remove qBittorrent", + "id": "SABN01", + "description": "SABnzbd newsgroup downloader", + "about": "This operation will install SABnzbd newsgroup downloader", "command": [ - "module_qbittorrent remove" + "module_sabnzbd install" ], "status": "Stable", "author": "@armbian", - "condition": "module_qbittorrent status" + "condition": "! module_sabnzbd status" }, { - "id": "DOW003", - "description": "Install Deluge", + "id": "SABN02", + "description": "SABnzbd remove", + "about": "This operation will remove SABnzbd newsgroup downloader", "command": [ - "module_deluge install" + "module_sabnzbd remove" ], "status": "Stable", "author": "@armbian", - "condition": "! module_deluge status" + "condition": "module_sabnzbd status" }, { - "id": "DOW004", - "description": "Remove Deluge", + "id": "SABN03", + "description": "SABnzbd purge with data folder", + "about": "This operation will purge SABnzbd newsgroup data folder", "command": [ - "module_deluge remove" + "module_sabnzbd purge" ], "status": "Stable", "author": "@armbian", - "condition": "module_deluge status" + "condition": "module_sabnzbd status" }, { - "id": "DOW005", - "description": "Install Transmission", + "id": "MDS001", + "description": "Medusa automatic downloader for TV shows", + "about": "This operation will install Medusa TV shows downloader", "command": [ - "module_transmission install" + "module_medusa install" ], "status": "Stable", "author": "@armbian", - "condition": "! module_transmission status" + "condition": "! module_medusa status" }, { - "id": "DOW006", - "description": "Remove Transmission", + "id": "MDS002", + "description": "Medusa TV shows downloader remove", + "about": "This operation will remove Medusa TV shows downloader", "command": [ - "module_transmission remove" + "module_medusa remove" ], "status": "Stable", "author": "@armbian", - "condition": "module_transmission status" + "condition": "module_medusa status" }, { - "id": "DOW011", - "description": "Install SABnzbd", + "id": "MDS003", + "description": "Medusa TV shows downloader purge", + "about": "This operation will purge Medusa TV shows data folder", "command": [ - "module_sabnzbd install" + "module_medusa purge" ], "status": "Stable", "author": "@armbian", - "condition": "! module_sabnzbd status" + "condition": "module_medusa status" }, { - "id": "DOW012", - "description": "Remove SABnzbd", + "id": "SON001", + "description": "Sonarr automatic downloader for TV shows", + "about": "This operation will install Sonarr PVR for Usenet and BitTorrent", "command": [ - "module_sabnzbd remove" + "module_sonarr install" ], "status": "Stable", "author": "@armbian", - "condition": "module_sabnzbd status" + "condition": "! module_sonarr status" }, { - "id": "DOW013", - "description": "Install Medusa", + "id": "SON002", + "description": "Sonarr remove", + "about": "This operation will remove Sonarr PVR for Usenet and BitTorrent", "command": [ - "module_medusa install" + "module_sonarr remove" ], "status": "Stable", "author": "@armbian", - "condition": "! module_medusa status" - }, + "condition": "module_sonarr status" + }, { - "id": "DOW014", - "description": "Remove Medusa", + "id": "SON003", + "description": "Sonarr purge with data folder", + "about": "This operation will purge Sonarr PVR for Usenet and BitTorrent purge data folder", "command": [ - "module_medusa remove" + "module_sonarr purge" ], "status": "Stable", "author": "@armbian", - "condition": "module_medusa status" + "condition": "module_sonarr status" }, { - "id": "DOW015", - "description": "Install Sonarr", + "id": "RAD001", + "description": "Radarr automatic downloader for movies", + "about": "This operation will install Radarr movie collection manager", "command": [ - "module_sonarr install" + "module_radarr install" ], "status": "Stable", "author": "@armbian", - "condition": "! module_sonarr status" + "condition": "! module_radarr status" }, { - "id": "DOW016", - "description": "Remove Sonarr", + "id": "RAD002", + "description": "Radarr remove", + "about": "This operation will remove Radarr movie collection manager", "command": [ - "module_sonarr remove" + "module_radarr remove" ], "status": "Stable", "author": "@armbian", - "condition": "module_sonarr status" + "condition": "module_radarr status" }, { - "id": "DOW017", - "description": "Install Radarr", + "id": "RAD003", + "description": "Radarr purge with data folder", + "about": "This operation will purge Radarr movie collection manager data folder", "command": [ - "module_radarr install" + "module_radarr purge" ], "status": "Stable", "author": "@armbian", - "condition": "! module_radarr status" + "condition": "module_radarr status" }, { - "id": "DOW018", - "description": "Remove Radarr", + "id": "BAZ001", + "description": "Bazarr automatic subtitles downloader for Sonarr and Radarr", + "about": "This operation will install Bazarr subtitles manager for Sonarr and Radarr", "command": [ - "module_radarr remove" + "module_bazarr install" ], "status": "Stable", "author": "@armbian", - "condition": "module_radarr status" + "condition": "! module_bazarr status" }, { - "id": "DOW019", - "description": "Install Bazarr", + "id": "BAZ002", + "description": "Bazarr remove", + "about": "This operation will remove Bazarr subtitles manager for Sonarr and Radarr", "command": [ - "module_bazarr install" + "module_bazarr remove" ], "status": "Stable", "author": "@armbian", - "condition": "! module_bazarr status" + "condition": "module_bazarr status" }, { - "id": "DOW020", - "description": "Remove Bazarr", + "id": "BAZ003", + "description": "Bazarr purge with data folder", + "about": "This operation will purge Bazarr subtitles manager with data folder", "command": [ - "module_bazarr remove" + "module_bazarr purge" ], "status": "Stable", "author": "@armbian", "condition": "module_bazarr status" }, { - "id": "DOW021", - "description": "Install Lidarr", + "id": "LID001", + "description": "Lidarr automatic music downloader", + "about": "This operation will install Lidarr music collection manager for Usenet and BitTorrent users", "command": [ "module_lidarr install" ], @@ -579,8 +702,9 @@ "condition": "! module_lidarr status" }, { - "id": "DOW022", - "description": "Remove Lidarr", + "id": "LID002", + "description": "Lidarr remove", + "about": "This operation will remove Lidarr", "command": [ "module_lidarr remove" ], @@ -589,8 +713,20 @@ "condition": "module_lidarr status" }, { - "id": "DOW023", - "description": "Install Readarr", + "id": "LID003", + "description": "Lidarr purge with data folder", + "about": "This operation will purge Lidarr with data folder", + "command": [ + "module_lidarr purge" + ], + "status": "Stable", + "author": "@armbian", + "condition": "module_lidarr status" + }, + { + "id": "RDR001", + "description": "Readarr automatic downloader for Ebooks", + "about": "This operation will install Readarr", "command": [ "module_readarr install" ], @@ -599,8 +735,9 @@ "condition": "! module_readarr status" }, { - "id": "DOW024", - "description": "Remove Readarr", + "id": "RDR002", + "description": "Readarr remove", + "about": "This operation will remove Readarr", "command": [ "module_readarr remove" ], @@ -608,9 +745,21 @@ "author": "@armbian", "condition": "module_readarr status" }, + { + "id": "RDR003", + "description": "Readarr purge with data folder", + "about": "This operation will purge Readarr with data folder", + "command": [ + "module_readarr purge" + ], + "status": "Stable", + "author": "@armbian", + "condition": "module_readarr status" + }, { "id": "DOW025", - "description": "Install Prowlarr", + "description": "Prowlarr index manager and proxy for PVR", + "about": "This operation will install Prowlarr", "command": [ "module_prowlarr install" ], @@ -620,7 +769,8 @@ }, { "id": "DOW026", - "description": "Remove Prowlarr", + "description": "Prowlarr remove", + "about": "This operation will remove Prowlarr", "command": [ "module_prowlarr remove" ], @@ -629,8 +779,20 @@ "condition": "module_prowlarr status" }, { - "id": "DOW040", - "description": "Jellyseerr install", + "id": "DOW027", + "description": "Prowlarr purge with data folder", + "about": "This operation will purge Prowlarr with data folder", + "command": [ + "module_prowlarr purge" + ], + "status": "Stable", + "author": "@armbian", + "condition": "module_prowlarr status" + }, + { + "id": "JEL001", + "description": "Jellyseerr Jellyfin/Emby/Plex integration install", + "about": "This operation will install Jellyseerr", "command": [ "module_jellyseerr install" ], @@ -639,8 +801,9 @@ "condition": "! module_jellyseerr status" }, { - "id": "DOW041", - "description": "Jellyseerr remove ", + "id": "JEL002", + "description": "Jellyseerr remove", + "about": "This operation will remove Jellyseerr", "command": [ "module_jellyseerr remove" ], @@ -649,20 +812,21 @@ "condition": "module_jellyseerr status" }, { - "id": "DOW042", - "description": "Jellyseerr purge data folder", + "id": "JEL003", + "description": "Jellyseerr purge with data folder", + "about": "This operation will purge Jellyseerr with data folder", "command": [ "module_jellyseerr purge" ], "status": "Stable", "author": "@armbian", - "condition": "! module_jellyseerr status && [[ -d \"${SOFTWARE_FOLDER}/jellyseerr\" ]]" + "condition": "module_jellyseerr status ]]" } ] }, { "id": "Database", - "description": "Database", + "description": "SQL database servers and web interface managers", "sub": [ { "id": "DAT001", @@ -726,45 +890,9 @@ } ] }, - { - "id": "DNS", - "description": "DNS blockers", - "sub": [ - { - "id": "DNS001", - "description": "Install Pi-hole DNS ad blocker", - "command": [ - "pi_hole install" - ], - "status": "Stable", - "author": "@armbian", - "condition": "! pi_hole status" - }, - { - "id": "DNS002", - "description": "Set Pi-hole web admin password", - "command": [ - "pi_hole password" - ], - "status": "Stable", - "author": "@armbian", - "condition": "pi_hole status" - }, - { - "id": "DNS003", - "description": "Remove Pi-hole DNS ad blocker", - "command": [ - "pi_hole uninstall" - ], - "status": "Stable", - "author": "@armbian", - "condition": "pi_hole status" - } - ] - }, { "id": "DevTools", - "description": "Development", + "description": "Applications and tools for development", "sub": [ { "id": "DEV001", @@ -790,115 +918,68 @@ } ] }, - { - "id": "HomeAutomation", - "description": "Home Automation", - "sub": [ - { - "id": "HA001", - "description": "Install openHAB", - "command": [ - "openhab install" - ], - "status": "Stable", - "author": "@armbian", - "condition": "! pkg_installed openhab" - }, - { - "id": "HA002", - "description": "Remove openHAB", - "command": [ - "openhab uninstall" - ], - "status": "Stable", - "author": "@armbian", - "condition": "pkg_installed openhab" - }, - { - "id": "HA003", - "description": "Install Home Assistant", - "command": [ - "module_haos install" - ], - "status": "Preview", - "author": "@igorpecovnik", - "condition": "! pkg_installed homeassistant-supervised && grep -q bookworm /etc/os-release" - }, - { - "id": "HA004", - "description": "Remove Home Assistant", - "command": [ - "module_haos uninstall" - ], - "status": "Preview", - "author": "@igorpecovnik", - "condition": "pkg_installed homeassistant-supervised" - } - ] - }, { "id": "Benchy", "description": "System benchmaking and diagnostics", "command": [ "see_monitoring" ], - "status": "Stable", + "status": "Disabled", "author": "@armbian", "condition": "[ -f /usr/bin/armbianmonitor ]" }, { "id": "Containers", - "description": "Containerlization and Virtual Machines", + "description": "Docker containerization and KVM virtual machines", "sub": [ { "id": "CON001", - "description": "Install Docker Minimal", + "description": "Docker Minimal Install", "about": "This operation will install Docker Minimal.", "command": [ - "install_docker" + "module_docker install minimal" ], "status": "Stable", "author": "@schwar3kat", - "condition": "! pkg_installed docker-ce" + "condition": "! module_docker status docker-ce" }, { "id": "CON002", - "description": "Install Docker Engine", + "description": "Docker Engine Install", "about": "This operation will install Docker Engine.", "command": [ - "install_docker engine" + "module_docker install engine" ], "status": "Stable", "author": "@schwar3kat", - "condition": "! pkg_installed docker-compose-plugin" + "condition": "! module_docker status docker-compose-plugin" }, { "id": "CON003", - "description": "Remove Docker", + "description": "Docker Remove", "about": "This operation will purge Docker.", "command": [ - "pkg_remove docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras" + "module_docker remove" ], "status": "Stable", "author": "@schwar3kat", - "condition": "pkg_installed docker-ce" + "condition": "module_docker status docker-ce" }, { "id": "CON004", - "description": "Purge all Docker images, containers, and volumes", + "description": "Docker Purge all images, containers, and volumes", "about": "This operation will delete all Docker images, containers, and volumes.", "command": [ - "rm -rf /var/lib/docker", - "rm -rf /var/lib/containerd" + "module_docker purge" ], "status": "Stable", "author": "@schwar3kat", - "condition": "! pkg_installed docker-ce && [ -d /var/lib/docker ]" + "condition": "! module_docker status docker-ce && [ -d /var/lib/docker ]" }, { "id": "CON005", - "description": "Install Portainer", - "prompt": "This operation will install Portainer.\nWould you like to continue?", + "description": "Portainer container management platform", + "prompt": "This operation will install Portainer container management platform.", "command": [ "module_portainer install" ], @@ -908,10 +989,10 @@ }, { "id": "CON006", - "description": "Remove Portainer", - "prompt": "This operation will delete Portainer container.\nWould you like to continue?", + "description": "Portainer remove", + "prompt": "This operation will remove Portainer container management platform.", "command": [ - "module_portainer uninstall" + "module_portainer remove" ], "status": "Stable", "author": "@armbian", @@ -919,78 +1000,79 @@ }, { "id": "CON007", - "description": "Watchtower install", + "description": "Portainer purge with with data folder", + "prompt": "This operation will remove Portainer container management platform.", "command": [ - "module_watchtower install" + "module_portainer remove" ], "status": "Stable", "author": "@armbian", - "condition": "! module_watchtower status" - }, - { - "id": "CON008", - "description": "Watchtower remove", - "command": [ - "module_watchtower remove" - ], - "status": "Stable", - "author": "@armbian", - "condition": "module_watchtower status" + "condition": "module_portainer status" } ] }, { "id": "Media", - "description": "Media Servers and Editors", + "description": "Media servers, organizers and editors", "sub": [ { "id": "MED001", - "description": "Install Plex Media server", + "description": "Plex Media server", "about": "This operation will install Plex Media server.", "command": [ - "install_plexmediaserver" + "module_plexmediaserver install" ], - "status": "Stable", + "status": "Disabled", "author": "@schwar3kat", - "condition": "! pkg_installed plexmediaserver" + "condition": "! module_plexmediaserver status" }, { "id": "MED002", - "description": "Remove Plex Media server", + "description": "Plex Media server remove", "about": "This operation will purge Plex Media server.", "command": [ - "pkg_remove plexmediaserver", - "sed -i '/plexmediaserver.gpg/s/^/#/g' /etc/apt/sources.list.d/plexmediaserver.list" + "module_plexmediaserver remove" ], - "status": "Stable", + "status": "Disabled", "author": "@schwar3kat", - "condition": "pkg_installed plexmediaserver" + "condition": "module_plexmediaserver status" }, { "id": "MED003", - "description": "Install Emby server", + "description": "Emby organizes video, music, live TV, and photos", "about": "This operation will install Emby server.", "command": [ - "install_embyserver" + "module_embyserver install" ], "status": "Stable", "author": "@schwar3kat", - "condition": "! pkg_installed emby-server" + "condition": "! module_embyserver status" }, { "id": "MED004", - "description": "Remove Emby server", - "about": "This operation will purge Emby server.", + "description": "Emby server remove", + "about": "This operation will remove Emby server", + "command": [ + "module_embyserver remove" + ], + "status": "Stable", + "author": "@schwar3kat", + "condition": "module_embyserver status" + }, + { + "id": "MED005", + "description": "Emby server purge with data folder", "command": [ - "pkg_remove emby-server" + "module_embyserver purge" ], "status": "Stable", "author": "@schwar3kat", - "condition": "pkg_installed emby-server" + "condition": "module_embyserver status" }, { "id": "MED010", - "description": "Stirling-PDF Install", + "description": "Stirling PDF tools for viewing and editing PDF files", + "about": "This operation will install Stirling-PDF tools.", "command": [ "module_stirling install" ], @@ -1000,7 +1082,8 @@ }, { "id": "MED011", - "description": "Stirling-PDF Remove", + "description": "Stirling PDF remove", + "about": "This operation will remove Stirling-PDF tools.", "command": [ "module_stirling remove" ], @@ -1010,17 +1093,18 @@ }, { "id": "MED012", - "description": "Stirling-PDF Purge data folder", + "description": "Stirling PDF purge with data folder", + "about": "This operation will purge Stirling-PDF tools with data folder.", "command": [ "module_stirling purge" ], "status": "Stable", "author": "@igorpecovnik", - "condition": "! module_stirling status && [[ -d \"${SOFTWARE_FOLDER}/stirling\" ]]" + "condition": "module_stirling status" }, { "id": "MED015", - "description": "Syncthing Install", + "description": "Syncthing continuous file synchronization", "command": [ "module_syncthing install" ], @@ -1030,7 +1114,7 @@ }, { "id": "MED016", - "description": "Syncthing Remove", + "description": "Syncthing remove", "command": [ "module_syncthing remove" ], @@ -1040,17 +1124,17 @@ }, { "id": "MED017", - "description": "Syncthing Purge data folder", + "description": "Syncthing purge with data folder", "command": [ "module_syncthing purge" ], "status": "Stable", "author": "@igorpecovnik", - "condition": "! module_syncthing status && [[ -d \"${SOFTWARE_FOLDER}/syncthing\" ]]" + "condition": "module_syncthing status" }, { "id": "MED020", - "description": "Nextcloud Install", + "description": "Nextcloud content collaboration platform", "command": [ "module_nextcloud install" ], @@ -1060,7 +1144,7 @@ }, { "id": "MED021", - "description": "Nextcloud Remove", + "description": "Nextcloud remove", "command": [ "module_nextcloud remove" ], @@ -1070,17 +1154,17 @@ }, { "id": "MED022", - "description": "Nextcloud Purge data folder", + "description": "Nextcloud purge with data folder", "command": [ "module_nextcloud purge" ], "status": "Stable", "author": "@igorpecovnik", - "condition": "! module_nextcloud status && [[ -d \"${SOFTWARE_FOLDER}/nextcloud\" ]]" + "condition": "module_nextcloud status" }, { "id": "MED025", - "description": "Owncloud Install", + "description": "Owncloud share files and folders, easy and secure", "command": [ "module_owncloud install" ], @@ -1090,7 +1174,7 @@ }, { "id": "MED026", - "description": "Owncloud Remove", + "description": "Owncloud remove", "command": [ "module_owncloud remove" ], @@ -1100,23 +1184,24 @@ }, { "id": "MED027", - "description": "Owncloud Purge data folder", + "description": "Owncloud purge with data folder", "command": [ "module_owncloud purge" ], "status": "Stable", "author": "@igorpecovnik", - "condition": "! module_owncloud status && [[ -d \"${SOFTWARE_FOLDER}/owncloud\" ]]" + "condition": "module_owncloud status" } ] }, { "id": "Monitoring", - "description": "Monitoring", + "description": "Real-time monitoring, collecting metrics, up-time status", "sub": [ { "id": "MON001", - "description": "Uptime Kuma install ", + "description": "Uptime Kuma self-hosted monitoring tool", + "about": "This operation will install Uptime Kuma", "command": [ "module_uptimekuma install" ], @@ -1127,6 +1212,7 @@ { "id": "MON002", "description": "Uptime Kuma remove", + "about": "This operation will remove Uptime Kuma", "command": [ "module_uptimekuma remove" ], @@ -1136,17 +1222,19 @@ }, { "id": "MON003", - "description": "Uptime Kuma purge data folder", + "description": "Uptime Kuma purge with data folder", + "about": "This operation will remove Uptime Kuma with data folder", "command": [ "module_uptimekuma purge" ], "status": "Stable", "author": "@igorpecovnik", - "condition": "! module_uptimekuma status && [[ -d \"${SOFTWARE_FOLDER}/uptimekuma\" ]]" + "condition": "module_uptimekuma status" }, { "id": "MON005", - "description": "Netdata Install", + "description": "Netdata - monitoring real-time metrics", + "about": "This operation will install Netdata", "command": [ "module_netdata install" ], @@ -1157,6 +1245,7 @@ { "id": "MON006", "description": "Netdata remove", + "about": "This operation will remove Netdata", "command": [ "module_netdata remove" ], @@ -1166,13 +1255,14 @@ }, { "id": "MON007", - "description": "Netdata purge data folder", + "description": "Netdata purge with data folder", + "about": "This operation will purge Netdata with data folder", "command": [ "module_netdata purge" ], "status": "Stable", "author": "@igorpecovnik", - "condition": "! module_netdata status && [[ -d \"${SOFTWARE_FOLDER}/netdata\" ]]" + "condition": "module_netdata status" } ] @@ -1236,6 +1326,104 @@ "condition": "" } ] + }, + { + "id": "Netconfig", + "description": "Console network tools for measuring load and bandwidth", + "sub": [ + { + "id": "NET001", + "description": "nload -realtime console network usage monitor", + "prompt": "This operation will install nload.", + "command": [ + "pkg_install nload" + ], + "status": "Stable", + "author": "@armbian", + "condition": "! pkg_installed nload" + }, + { + "id": "NET002", + "description": "nload - remove", + "prompt": "This operation will remove nload.", + "command": [ + "pkg_remove nload" + ], + "status": "Stable", + "author": "@armbian", + "condition": "pkg_installed nload" + }, + { + "id": "NET003", + "description": "iperf3 bandwidth measuring tool", + "prompt": "This operation will install iperf3.", + "command": [ + "pkg_install iperf3" + ], + "status": "Stable", + "author": "@armbian", + "condition": "! pkg_installed iperf3" + }, + { + "id": "NET004", + "description": "iperf3 remove", + "prompt": "This operation will remove iperf3.", + "command": [ + "pkg_remove iperf3" + ], + "status": "Stable", + "author": "@armbian", + "condition": "pkg_installed iperf3" + }, + { + "id": "NET005", + "description": "iptraf-ng IP LAN monitor", + "prompt": "This operation will install iptraf-ng.", + "command": [ + "pkg_install iptraf-ng" + ], + "status": "Stable", + "author": "@armbian", + "condition": "! pkg_installed iptraf-ng" + }, + { + "id": "NET006", + "description": "iptraf-ng remove", + "prompt": "This operation will remove iptraf-ng.", + "command": [ + "pkg_remove iptraf-ng" + ], + "status": "Stable", + "author": "@armbian", + "condition": "pkg_installed iptraf-ng" + }, + { + "id": "NET007", + "description": "avahi-daemon hostname broadcast via mDNS", + "prompt": "This operation will install avahi-daemon.", + "command": [ + "pkg_install avahi-daemon libnss-mdns", + "cp /usr/share/doc/avahi-daemon/examples/sftp-ssh.service /etc/avahi/services/", + "cp /usr/share/doc/avahi-daemon/examples/ssh.service /etc/avahi/services/", + "service restart avahi-daemon" + ], + "status": "Stable", + "author": "@armbian", + "condition": "! pkg_installed avahi-daemon" + }, + { + "id": "NET008", + "description": "avahi-daemon remove", + "prompt": "This operation will remove avahi-daemon.", + "command": [ + "systemctl stop avahi-daemon avahi-daemon.socket", + "pkg_remove avahi-daemon" + ], + "status": "Stable", + "author": "@armbian", + "condition": "pkg_installed avahi-daemon" + } + ] } ] } diff --git a/tools/json/config.system.json b/tools/json/config.system.json index 41e13e317..c09fc556a 100644 --- a/tools/json/config.system.json +++ b/tools/json/config.system.json @@ -462,7 +462,29 @@ "status": "Disabled", "author": "@igorpecovnik", "condition": "[ -f /etc/armbian-distribution-status ] && release_upgrade rolling verify" + }, + { + "id": "WTC001", + "description": "Enable automating Docker container base images updating", + "command": [ + "module_watchtower install" + ], + "status": "Stable", + "author": "@armbian", + "condition": "! module_watchtower status && pkg_installed docker-ce" + }, + { + "id": "WTC002", + "description": "Disable automating Docker container base images updating", + "command": [ + "module_watchtower remove" + ], + "status": "Stable", + "author": "@armbian", + "condition": "module_watchtower status && pkg_installed docker-ce" } + + ] } ] diff --git a/tools/modules/functions/set_runtime_variables.sh b/tools/modules/functions/set_runtime_variables.sh index 374da15fc..05031e169 100644 --- a/tools/modules/functions/set_runtime_variables.sh +++ b/tools/modules/functions/set_runtime_variables.sh @@ -60,6 +60,7 @@ function set_runtime_variables() { DEFAULT_ADAPTER=$(ip -4 route ls | grep default | tail -1 | grep -Po '(?<=dev )(\S+)') LOCALIPADD=$(ip -4 addr show dev $DEFAULT_ADAPTER | awk '/inet/ {print $2}' | cut -d'/' -f1) LOCALSUBNET=$(echo ${LOCALIPADD} | cut -d"." -f1-3).0/24 + LOCALWHITELIST=$(echo ${LOCALIPADD} | cut -d"." -f1-3)".*" # for transmission BACKTITLE="Contribute: https://github.com/armbian/configng" TITLE="Armbian configuration utility" [[ -z "${DEFAULT_ADAPTER// /}" ]] && DEFAULT_ADAPTER="lo" diff --git a/tools/modules/runtime/config.runtime.sh b/tools/modules/runtime/config.runtime.sh index 3edb035a0..5dad1148c 100644 --- a/tools/modules/runtime/config.runtime.sh +++ b/tools/modules/runtime/config.runtime.sh @@ -94,28 +94,48 @@ fi #plex_media_port="$(lsof -i -P -n | grep TCP | grep LISTEN | grep 'plex' | awk -F: '{print $2}' | awk '{print $1}' | head -n 1)" #update_sub_submenu_data "Software" "Media" "SW22" "https://localhost:$plex_media_port" +# System update_sub_submenu_data "System" "Storage" "SY220" "$(module_zfs zfs_version)" update_sub_submenu_data "System" "Storage" "SY221" "$(module_zfs zfs_installed_version)" update_sub_submenu_data "System" "Storage" "NFS04" "$NFS_CLIENTS_NUMBER" + +# Database update_sub_submenu_data "Software" "Database" "DAT002" "Server: $LOCALIPADD" update_sub_submenu_data "Software" "Database" "DAT006" "http://$LOCALIPADD:${module_options["module_phpmyadmin,port"]}" -update_sub_submenu_data "Software" "Media" "MED006" "http://$LOCALIPADD:${module_options["module_stirling,port"]}" -update_sub_submenu_data "Software" "Media" "MED016" "http://$LOCALIPADD:${module_options["module_syncthing,port"]}" + +# Media +update_sub_submenu_data "Software" "Media" "MED002" "http://$LOCALIPADD:${module_options["module_plexmediaserver,port"]}" +update_sub_submenu_data "Software" "Media" "MED004" "http://$LOCALIPADD:${module_options["module_embyserver,port"]}" +update_sub_submenu_data "Software" "Media" "MED011" "http://$LOCALIPADD:${module_options["module_stirling,port"]}" +update_sub_submenu_data "Software" "Media" "MED016" "http://$LOCALIPADD:${module_options["module_syncthing,port"]%% *}" # removing second port from url update_sub_submenu_data "Software" "Media" "MED021" "https://$LOCALIPADD:${module_options["module_nextcloud,port"]}" update_sub_submenu_data "Software" "Media" "MED026" "http://$LOCALIPADD:${module_options["module_owncloud,port"]}" -update_sub_submenu_data "Software" "Containers" "CON006" "http://$LOCALIPADD:${module_options["module_portainer,port"]}" -update_sub_submenu_data "Software" "HomeAutomation" "HA004" "http://$LOCALIPADD:${module_options["module_haos,port"]}" -update_sub_submenu_data "Software" "Monitoring" "MON004" "http://$LOCALIPADD:${module_options["module_netdata,port"]}" -update_sub_submenu_data "Software" "Downloaders" "DOW002" "http://$LOCALIPADD:${module_options["module_qbittorrent,port"]}" -update_sub_submenu_data "Software" "Downloaders" "DOW004" "http://$LOCALIPADD:${module_options["module_deluge,port"]}" -update_sub_submenu_data "Software" "Downloaders" "DOW006" "http://$LOCALIPADD:${module_options["module_transmission,port"]}" -update_sub_submenu_data "Software" "Downloaders" "DOW012" "http://$LOCALIPADD:${module_options["module_sabnzbd,port"]}" -update_sub_submenu_data "Software" "Downloaders" "DOW014" "http://$LOCALIPADD:${module_options["module_medusa,port"]}" -update_sub_submenu_data "Software" "Downloaders" "DOW016" "http://$LOCALIPADD:${module_options["module_sonarr,port"]}" -update_sub_submenu_data "Software" "Downloaders" "DOW018" "http://$LOCALIPADD:${module_options["module_radarr,port"]}" -update_sub_submenu_data "Software" "Downloaders" "DOW020" "http://$LOCALIPADD:${module_options["module_bazarr,port"]}" -update_sub_submenu_data "Software" "Downloaders" "DOW022" "http://$LOCALIPADD:${module_options["module_lidarr,port"]}" -update_sub_submenu_data "Software" "Downloaders" "DOW024" "http://$LOCALIPADD:${module_options["module_readarr,port"]}" + +# Containers +update_sub_submenu_data "Software" "Containers" "CON006" "http://$LOCALIPADD:${module_options["module_portainer,port"]%% *}" # removing second port from url + +# Home automation +update_sub_submenu_data "Software" "HomeAutomation" "HAB002" "http://$LOCALIPADD:${module_options["module_openhab,port"]}" +update_sub_submenu_data "Software" "HomeAutomation" "HAS002" "http://$LOCALIPADD:${module_options["module_haos,port"]}" + +# DNS +update_sub_submenu_data "Software" "DNS" "DNS003" "http://$LOCALIPADD:${module_options["module_pi_hole,port"]%% *}" # removing second port from url + +# Monitoring +update_sub_submenu_data "Software" "Monitoring" "MON002" "http://$LOCALIPADD:${module_options["module_uptimekuma,port"]}" +update_sub_submenu_data "Software" "Monitoring" "MON006" "http://$LOCALIPADD:${module_options["module_netdata,port"]}" + +# Downloaders +update_sub_submenu_data "Software" "Downloaders" "DOW002" "http://$LOCALIPADD:${module_options["module_qbittorrent,port"]%% *}" # removing second port from url +update_sub_submenu_data "Software" "Downloaders" "DEL002" "http://$LOCALIPADD:${module_options["module_deluge,port"]%% *}" # removing second port from url +update_sub_submenu_data "Software" "Downloaders" "TRA002" "http://$LOCALIPADD:${module_options["module_transmission,port"]%% *}" # removing second port from url +update_sub_submenu_data "Software" "Downloaders" "SABN02" "http://$LOCALIPADD:${module_options["module_sabnzbd,port"]}" +update_sub_submenu_data "Software" "Downloaders" "MDS002" "http://$LOCALIPADD:${module_options["module_medusa,port"]}" +update_sub_submenu_data "Software" "Downloaders" "SON002" "http://$LOCALIPADD:${module_options["module_sonarr,port"]}" +update_sub_submenu_data "Software" "Downloaders" "RAD002" "http://$LOCALIPADD:${module_options["module_radarr,port"]}" +update_sub_submenu_data "Software" "Downloaders" "BAZ002" "http://$LOCALIPADD:${module_options["module_bazarr,port"]}" +update_sub_submenu_data "Software" "Downloaders" "LID002" "http://$LOCALIPADD:${module_options["module_lidarr,port"]}" +update_sub_submenu_data "Software" "Downloaders" "RDR002" "http://$LOCALIPADD:${module_options["module_readarr,port"]}" update_sub_submenu_data "Software" "Downloaders" "DOW026" "http://$LOCALIPADD:${module_options["module_prowlarr,port"]}" -update_sub_submenu_data "Software" "Downloaders" "DOW041" "http://$LOCALIPADD:${module_options["module_jellyseerr,port"]}" +update_sub_submenu_data "Software" "Downloaders" "JEL002" "http://$LOCALIPADD:${module_options["module_jellyseerr,port"]}" diff --git a/tools/modules/software/install_docker.sh b/tools/modules/software/install_docker.sh deleted file mode 100644 index 7d00bb87d..000000000 --- a/tools/modules/software/install_docker.sh +++ /dev/null @@ -1,41 +0,0 @@ - -module_options+=( - ["install_docker,author"]="@schwar3kat" - ["install_docker,ref_link"]="" - ["install_docker,feature"]="install_docker" - ["install_docker,desc"]="Install docker from a repo using apt" - ["install_docker,example"]="install_docker engine" - ["install_docker,status"]="Active" -) -# -# Install Docker from repo using apt -# Setup sources list and GPG key then install the app. If you want a full desktop then $1=desktop -# -install_docker() { - # Check if repo for distribution exists. - URL="https://download.docker.com/linux/${DISTRO,,}/dists/$DISTROID" - if wget --spider "${URL}" 2> /dev/null; then - # Add Docker's official GPG key: - wget -qO - https://download.docker.com/linux/${DISTRO,,}/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/docker.gpg > /dev/null - if [[ $? -eq 0 ]]; then - # Add the repository to Apt sources: - cat <<- EOF > "/etc/apt/sources.list.d/docker.list" - deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/${DISTRO,,} $DISTROID stable - EOF - pkg_update - # Install docker - if [ "$1" = "engine" ]; then - pkg_install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin - else - pkg_install docker-ce docker-ce-cli containerd.io - fi - groupadd docker 2>/dev/null || true - usermod -aG docker $SUDO_USER - systemctl enable docker.service > /dev/null 2>&1 - systemctl enable containerd.service > /dev/null 2>&1 - fi - else - $DIALOG --msgbox "ERROR ! ${DISTRO} $DISTROID distribution not found in repository!" 7 70 - fi -} - diff --git a/tools/modules/software/install_embyserver.sh b/tools/modules/software/install_embyserver.sh deleted file mode 100644 index 246564f8e..000000000 --- a/tools/modules/software/install_embyserver.sh +++ /dev/null @@ -1,23 +0,0 @@ - -module_options+=( - ["install_embyserver,author"]="@schwar3kat" - ["install_embyserver,ref_link"]="" - ["install_embyserver,feature"]="install_embyserver" - ["install_embyserver,desc"]="Install embyserver from repo using apt" - ["install_embyserver,example"]="install_embyserver" - ["install_embyserver,status"]="Active" -) -# -# -# Download a deb file from a URL and install using wget and apt with dialog progress bars -# -install_embyserver() { - URL=$(curl -s https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | - grep "/emby-server-deb.*$(dpkg --print-architecture).deb" | cut -d : -f 2,3 | tr -d '"') - cd ~/ - wget -O "emby-server.deb" $URL 2>&1 | stdbuf -oL awk '/[.] +[0-9][0-9]?[0-9]?%/ { print substr($0,63,3) }' | - $DIALOG --gauge "Please wait\nDownloading ${URL##*/}" 8 70 0 - pkg_install ~/emby-server.deb - unlink emby-server.deb - $DIALOG --msgbox "To test that Emby Server has installed successfully\nIn a web browser go to http://localhost:8096 or \nhttp://127.0.0.1:8096 on this computer." 9 70 -} diff --git a/tools/modules/software/install_openhab.sh b/tools/modules/software/install_openhab.sh deleted file mode 100644 index c6aa2391b..000000000 --- a/tools/modules/software/install_openhab.sh +++ /dev/null @@ -1,45 +0,0 @@ - -module_options+=( - ["openhab,author"]="@igorpecovnik" - ["openhab,ref_link"]="" - ["openhab,feature"]="openhab" - ["openhab,desc"]="Install openhab from a repo using apt" - ["openhab,example"]="install uinstall" - ["openhab,status"]="Active" -) -# -# Install openHAB from repo using apt -# -openhab() { - - case "$1" in - install) - - # keys - wget -qO - https://repos.azul.com/azul-repo.key | gpg --dearmor > "/usr/share/keyrings/azul.gpg" - wget -qO - https://openhab.jfrog.io/artifactory/api/gpg/key/public | gpg --dearmor > "/usr/share/keyrings/openhab.gpg" - # repos - echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" > "/etc/apt/sources.list.d/zulu.list" - echo "deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main" > "/etc/apt/sources.list.d/openhab.list" - - pkg_update - - # Optional preinstall top 10 tools - pkg_install zulu17-jdk - pkg_install openhab openhab-addons - systemctl daemon-reload 2> /dev/null - systemctl enable openhab.service 2> /dev/null - systemctl start openhab.service 2> /dev/null - - ;; - - uninstall) - - pkg_remove zulu17-jdk openhab openhab-addons - systemctl disable openhab.service 2> /dev/null - rm -f /usr/share/keyrings/openhab.gpg /usr/share/keyrings/azul.gpg - rm -f /etc/apt/sources.list.d/zulu.list /etc/apt/sources.list.d/openhab.list - - ;; - esac -} diff --git a/tools/modules/software/install_pi-hole.sh b/tools/modules/software/install_pi-hole.sh deleted file mode 100644 index 99a66bbac..000000000 --- a/tools/modules/software/install_pi-hole.sh +++ /dev/null @@ -1,101 +0,0 @@ - -module_options+=( - ["pi_hole,author"]="@armbian" - ["pi_hole,ref_link"]="" - ["pi_hole,feature"]="pi_hole" - ["pi_hole,desc"]="Install/uninstall/check status of pi-hole container" - ["pi_hole,example"]="help install uninstall status password" - ["pi_hole,status"]="Active" -) -# -# Install Pi-Hole DNS blocking -# -function pi_hole () { - - if pkg_installed docker-ce; then - local container=$(docker container ls -a | mawk '/pihole?( |$)/{print $1}') - local image=$(docker image ls -a | mawk '/pihole?( |$)/{print $3}') - fi - local commands - IFS=' ' read -r -a commands <<< "${module_options["pi_hole,example"]}" - - PIHOLE_BASE=/opt/pihole-storage - PIHOLE_BASE="${PIHOLE_BASE:-$(pwd)}" - [[ -d "$PIHOLE_BASE" ]] || mkdir -p "$PIHOLE_BASE" || { echo "Couldn't create storage directory: $PIHOLE_BASE"; exit 1; } - - case "$1" in - "${commands[0]}") - ## help/menu options for the module - echo -e "\nUsage: ${module_options["pi_hole,feature"]} " - echo -e "Commands: ${module_options["pi_hole,example"]}" - echo "Available commands:" - if [[ "${container}" ]] || [[ "${image}" ]]; then - echo -e "\tstatus\t- Show the status of the $title service." - echo -e "\tremove\t- Remove $title." - else - echo -e " install\t- Install $title." - fi - echo - ;; - install) - - pkg_installed docker-ce || install_docker - - # disable dns within systemd-resolved - if systemctl is-active --quiet systemd-resolved.service && ! grep -q "^DNSStubListener=no" /etc/systemd/resolved.conf; then - sed -i "s/^#\?DNSStubListener=.*/DNSStubListener=no/" /etc/systemd/resolved.conf - systemctl restart systemd-resolved.service - sleep 3 - fi - # disable dns within Network manager - if systemctl is-active --quiet NetworkManager && grep -q "dns=true" /etc/NetworkManager/NetworkManager.conf; then - sed -i "s/dns=.*/dns=false/g" /etc/NetworkManager/NetworkManager.conf - systemctl restart NetworkManager - sleep 3 - fi - - docker run -d \ - --name pihole \ - -p 53:53/tcp -p 53:53/udp \ - -p 80:80 \ - -e TZ="$(cat /etc/timezone)" \ - -v "${PIHOLE_BASE}/etc-pihole:/etc/pihole" \ - -v "${PIHOLE_BASE}/etc-dnsmasq.d:/etc/dnsmasq.d" \ - --dns=9.9.9.9 \ - --restart=unless-stopped \ - --hostname pi.hole \ - -e VIRTUAL_HOST="pi.hole" \ - -e PROXY_LOCATION="pi.hole" \ - -e FTLCONF_LOCAL_IPV4="${LOCALIPADD}" \ - pihole/pihole:latest - - for i in $(seq 1 20); do - if [ "$(docker inspect -f "{{.State.Health.Status}}" pihole)" == "healthy" ] ; then - break - else - sleep 3 - fi - if [ $i -eq 20 ] ; then - echo -e "\nTimed out waiting for Pi-hole start, consult your container logs for more info (\`docker logs pihole\`)" - exit 1 - fi - done - ;; - - uninstall) - [[ "${container}" ]] && docker container rm -f "$container" >/dev/null - [[ "${image}" ]] && docker image rm "$image" >/dev/null - ;; - password) - SELECTED_PASSWORD=$($DIALOG --title "Enter new password for Pi-hole admin" --passwordbox "" 7 50 3>&1 1>&2 2>&3) - if [[ -n $SELECTED_PASSWORD ]]; then - docker exec -it "${container}" sh -c "sudo pihole -a -p ${SELECTED_PASSWORD}" >/dev/null - fi - ;; - status) - [[ "${container}" ]] || [[ "${image}" ]] && return 0 - ;; - esac -} - -#pi_hole help diff --git a/tools/modules/software/install_plexmediaserver.sh b/tools/modules/software/install_plexmediaserver.sh deleted file mode 100644 index 0e2f2287f..000000000 --- a/tools/modules/software/install_plexmediaserver.sh +++ /dev/null @@ -1,24 +0,0 @@ -module_options+=( - ["install_plexmediaserver,author"]="@schwar3kat" - ["install_plexmediaserver,ref_link"]="" - ["install_plexmediaserver,feature"]="install_plexmediaserver" - ["install_plexmediaserver,desc"]="Install plexmediaserver from repo using apt" - ["install_plexmediaserver,example"]="install_plexmediaserver" - ["install_plexmediaserver,status"]="Active" -) -# -# Install plexmediaserver using apt -# -install_plexmediaserver() { - if [ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]; then - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/plexmediaserver.gpg] https://downloads.plex.tv/repo/deb public main" | sudo tee /etc/apt/sources.list.d/plexmediaserver.list > /dev/null 2>&1 - else - sed -i "/downloads.plex.tv/s/^#//g" /etc/apt/sources.list.d/plexmediaserver.list > /dev/null 2>&1 - fi - # Note: for compatibility with existing source file in some builds format must be gpg not asc - # and location must be /usr/share/keyrings - wget -qO- https://downloads.plex.tv/plex-keys/PlexSign.key | gpg --dearmor | sudo tee /usr/share/keyrings/plexmediaserver.gpg > /dev/null 2>&1 - pkg_install --update plexmediaserver - $DIALOG --msgbox "To test that Plex Media Server has installed successfully\nIn a web browser go to http://localhost:32400/web or\nhttp://127.0.0.1:32400/web on this computer." 9 70 -} - diff --git a/tools/modules/software/install_portainer.sh b/tools/modules/software/install_portainer.sh deleted file mode 100644 index 20cf933ac..000000000 --- a/tools/modules/software/install_portainer.sh +++ /dev/null @@ -1,60 +0,0 @@ - -module_options+=( - ["module_portainer,author"]="@armbian" - ["module_portainer,ref_link"]="" - ["module_portainer,feature"]="module_portainer" - ["module_portainer,desc"]="Install/uninstall/check status of portainer container" - ["module_portainer,example"]="help install uninstall status" - ["module_portainer,status"]="Active" - ["module_portainer,port"]="9000" -) -# -# Install portainer container -# -module_portainer() { - - if pkg_installed docker-ce; then - local container=$(docker container ls -a | mawk '/portainer\/portainer(-ce)?( |$)/{print $1}') - local image=$(docker image ls -a | mawk '/portainer\/portainer(-ce)?( |$)/{print $3}') - fi - # Convert the example string to an array - local commands - IFS=' ' read -r -a commands <<< "${module_options["module_portainer,example"]}" - - case "$1" in - "${commands[0]}") - ## help/menu options for the module - echo -e "\nUsage: ${module_options["module_webmin,feature"]} " - echo -e "Commands: ${module_options["module_webmin,example"]}" - echo "Available commands:" - if [[ "${container}" ]] || [[ "${image}" ]]; then - echo -e "\tstatus\t- Show the status of the $title service." - echo -e "\tremove\t- Remove $title." - else - echo -e " install\t- Install $title." - fi - echo - ;; - install) - pkg_installed docker-ce || install_docker - docker volume ls -q | grep -xq 'portainer_data' || docker volume create portainer_data - docker run -d \ - -p '9000:9000' \ - -p '8000:8000' \ - -p '9443:9443' \ - --name=portainer --restart=always \ - -v '/run/docker.sock:/var/run/docker.sock' \ - -v '/etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt:ro' \ - -v 'portainer_data:/data' 'portainer/portainer-ce' - ;; - uninstall) - [[ "${container}" ]] && docker container rm -f "$container" - [[ "${image}" ]] && docker image rm "$image" - ;; - status) - [[ "${container}" ]] || [[ "${image}" ]] && return 0 - ;; - esac -} - -#module_portainer help diff --git a/tools/modules/software/install_bazarr.sh b/tools/modules/software/module_bazarr.sh similarity index 80% rename from tools/modules/software/install_bazarr.sh rename to tools/modules/software/module_bazarr.sh index 39852e77c..573cfebc5 100644 --- a/tools/modules/software/install_bazarr.sh +++ b/tools/modules/software/module_bazarr.sh @@ -1,11 +1,14 @@ module_options+=( ["module_bazarr,author"]="@igorpecovnik" + ["module_bazarr,maintainer"]="@igorpecovnik" ["module_bazarr,feature"]="module_bazarr" + ["module_bazarr,example"]="install remove purge status help" ["module_bazarr,desc"]="Install bazarr container" - ["module_bazarr,example"]="install remove status help" - ["module_bazarr,port"]="6767" ["module_bazarr,status"]="Active" - ["module_bazarr,arch"]="x86-64,arm64" + ["module_bazarr,doc_link"]="https://wiki.bazarr.media/" + ["module_bazarr,group"]="Downloaders" + ["module_bazarr,port"]="6767" + ["module_bazarr,arch"]="x86-64 arm64" ) # # Module Bazarr @@ -26,13 +29,14 @@ function module_bazarr () { case "$1" in "${commands[0]}") - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install [[ -d "$BAZARR_BASE" ]] || mkdir -p "$BAZARR_BASE" || { echo "Couldn't create storage directory: $BAZARR_BASE"; exit 1; } docker run -d \ --name=bazarr \ + --net=lsio \ -e PUID=1000 \ -e PGID=1000 \ - -e TZ=Etc/UTC \ + -e TZ="$(cat /etc/timezone)" \ -p 6767:6767 \ -v "${BAZARR_BASE}/config:/config" \ -v "${BAZARR_BASE}/movies:/movies" `#optional` \ @@ -54,26 +58,30 @@ function module_bazarr () { "${commands[1]}") [[ "${container}" ]] && docker container rm -f "$container" >/dev/null [[ "${image}" ]] && docker image rm "$image" >/dev/null - [[ -n "${BAZARR_BASE}" && "${BAZARR_BASE}" != "/" ]] && rm -rf "${BAZARR_BASE}" ;; "${commands[2]}") + ${module_options["module_bazarr,feature"]} ${commands[1]} + [[ -n "${BAZARR_BASE}" && "${BAZARR_BASE}" != "/" ]] && rm -rf "${BAZARR_BASE}" + ;; + "${commands[3]}") if [[ "${container}" && "${image}" ]]; then return 0 else return 1 fi ;; - "${commands[3]}") + "${commands[4]}") echo -e "\nUsage: ${module_options["module_bazarr,feature"]} " echo -e "Commands: ${module_options["module_bazarr,example"]}" echo "Available commands:" echo -e "\tinstall\t- Install $title." echo -e "\tstatus\t- Installation status $title." echo -e "\tremove\t- Remove $title." + echo -e "\tremove\t- Purge $title." echo ;; *) - ${module_options["module_bazarr,feature"]} ${commands[3]} + ${module_options["module_bazarr,feature"]} ${commands[4]} ;; esac } diff --git a/tools/modules/software/install_deluge.sh b/tools/modules/software/module_deluge.sh similarity index 81% rename from tools/modules/software/install_deluge.sh rename to tools/modules/software/module_deluge.sh index 66b911776..5b9f0b4bc 100644 --- a/tools/modules/software/install_deluge.sh +++ b/tools/modules/software/module_deluge.sh @@ -1,11 +1,14 @@ module_options+=( - ["module_deluge,author"]="@armbian" + ["module_deluge,author"]="@igorpecovnik" + ["module_deluge,maintainer"]="@igorpecovnik" ["module_deluge,feature"]="module_deluge" + ["module_deluge,example"]="install remove purge status help" ["module_deluge,desc"]="Install deluge container" - ["module_deluge,example"]="install remove status help" - ["module_deluge,port"]="8112 6181 58846" ["module_deluge,status"]="Active" - ["module_deluge,arch"]="x86-64,arm64" + ["module_deluge,doc_link"]="https://deluge-torrent.org/userguide/" + ["module_deluge,group"]="Downloaders" + ["module_deluge,port"]="8112 6181 58846" + ["module_deluge,arch"]="x86-64 arm64" ) # # Module deluge @@ -26,10 +29,11 @@ function module_deluge () { case "$1" in "${commands[0]}") - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install [[ -d "$DELUGE_BASE" ]] || mkdir -p "$DELUGE_BASE" || { echo "Couldn't create storage directory: $DELUGE_BASE"; exit 1; } docker run -d \ --name=deluge \ + --net=lsio \ -e PUID=1000 \ -e PGID=1000 \ -e TZ="$(cat /etc/timezone)" \ @@ -57,16 +61,19 @@ function module_deluge () { "${commands[1]}") [[ "${container}" ]] && docker container rm -f "$container" >/dev/null [[ "${image}" ]] && docker image rm "$image" >/dev/null - [[ -n "${DELUGE_BASE}" && "${DELUGE_BASE}" != "/" ]] && rm -rf "${DELUGE_BASE}" ;; "${commands[2]}") + ${module_options["module_deluge,feature"]} ${commands[1]} + [[ -n "${DELUGE_BASE}" && "${DELUGE_BASE}" != "/" ]] && rm -rf "${DELUGE_BASE}" + ;; + "${commands[3]}") if [[ "${container}" && "${image}" ]]; then return 0 else return 1 fi ;; - "${commands[3]}") + "${commands[4]}") echo -e "\nUsage: ${module_options["module_deluge,feature"]} " echo -e "Commands: ${module_options["module_deluge,example"]}" echo "Available commands:" @@ -76,7 +83,7 @@ function module_deluge () { echo ;; *) - ${module_options["module_deluge,feature"]} ${commands[3]} + ${module_options["module_deluge,feature"]} ${commands[4]} ;; esac } diff --git a/tools/modules/software/module_docker.sh b/tools/modules/software/module_docker.sh new file mode 100644 index 000000000..3e3ae9006 --- /dev/null +++ b/tools/modules/software/module_docker.sh @@ -0,0 +1,94 @@ +module_options+=( + ["module_docker,author"]="@schwar3kat" + ["module_docker,maintainer"]="@igorpecovnik" + ["module_docker,feature"]="module_docker" + ["module_docker,example"]="install remove purge status help" + ["module_docker,desc"]="Install docker from a repo using apt" + ["module_docker,status"]="Active" + ["module_docker,doc_link"]="https://wiki.bazarr.media/" + ["module_docker,group"]="Containers" + ["module_docker,port"]="" + ["module_docker,arch"]="x86-64 arm64 armhf" +) +# +# Install Docker from repo using apt +# +function module_docker() { + + local title="docker" + local condition=$(which "$title" 2>/dev/null) + + local commands + IFS=' ' read -r -a commands <<< "${module_options["module_docker,example"]}" + + case "$1" in + "${commands[0]}") + # Check if repo for distribution exists. + URL="https://download.docker.com/linux/${DISTRO,,}/dists/$DISTROID" + if wget --spider "${URL}" 2> /dev/null; then + # Add Docker's official GPG key: + wget -qO - https://download.docker.com/linux/${DISTRO,,}/gpg \ + | gpg --dearmor | sudo tee /usr/share/keyrings/docker.gpg > /dev/null + if [[ $? -eq 0 ]]; then + # Add the repository to Apt sources: + cat <<- EOF > "/etc/apt/sources.list.d/docker.list" + deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] \ + https://download.docker.com/linux/${DISTRO,,} $DISTROID stable + EOF + pkg_update + # Install docker + if [ "$2" = "engine" ]; then + pkg_install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + else + pkg_install docker-ce docker-ce-cli containerd.io + fi + + groupadd docker 2>/dev/null || true + usermod -aG docker $SUDO_USER + systemctl enable docker.service > /dev/null 2>&1 + systemctl enable containerd.service > /dev/null 2>&1 + docker network create lsio 2> /dev/null + fi + else + $DIALOG --msgbox "ERROR ! ${DISTRO} $DISTROID distribution not found in repository!" 7 70 + fi + ;; + "${commands[1]}") + pkg_remove docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras + ;; + "${commands[2]}") + rm -rf /var/lib/docker + rm -rf /var/lib/containerd + ;; + "${commands[3]}") + if [ "$2" = "docker-ce" ]; then + if pkg_installed docker-ce; then + return 0 + else + return 1 + fi + fi + if [ "$2" = "docker-compose-plugin" ]; then + if pkg_installed docker-compose-plugin; then + return 0 + else + return 1 + fi + fi + ;; + "${commands[4]}") + echo -e "\nUsage: ${module_options["module_docker,feature"]} " + echo -e "Commands: ${module_options["module_docker,example"]}" + echo "Available commands:" + echo -e "\tinstall\t- Install $title." + echo -e "\tstatus\t- Installation status $title." + echo -e "\tremove\t- Remove $title." + echo -e "\tremove\t- Purge $title." + echo + ;; + *) + ${module_options["module_docker,feature"]} ${commands[4]} + ;; + esac +} + diff --git a/tools/modules/software/module_embyserver.sh b/tools/modules/software/module_embyserver.sh new file mode 100644 index 000000000..f52f7a290 --- /dev/null +++ b/tools/modules/software/module_embyserver.sh @@ -0,0 +1,87 @@ +module_options+=( + ["module_embyserver,author"]="@schwar3kat" + ["module_embyserver,maintainer"]="@schwar3kat" + ["module_embyserver,feature"]="module_embyserver" + ["module_embyserver,example"]="install remove purge status help" + ["module_embyserver,desc"]="Install embyserver container" + ["module_embyserver,status"]="Active" + ["module_embyserver,doc_link"]="https://emby.media" + ["module_embyserver,group"]="Media" + ["module_embyserver,port"]="8096" + ["module_embyserver,arch"]="x86-64 arm64" +) +# +# Module Emby server +# +function module_embyserver () { + local title="emby" + local condition=$(which "$title" 2>/dev/null) + + if pkg_installed docker-ce; then + local container=$(docker container ls -a | mawk '/emby?( |$)/{print $1}') + local image=$(docker image ls -a | mawk '/emby?( |$)/{print $3}') + fi + + local commands + IFS=' ' read -r -a commands <<< "${module_options["module_embyserver,example"]}" + + EMBY_BASE="${SOFTWARE_FOLDER}/emby" + + case "$1" in + "${commands[0]}") + pkg_installed docker-ce || module_docker install + [[ -d "$EMBY_BASE" ]] || mkdir -p "$EMBY_BASE" || { echo "Couldn't create storage directory: $EMBY_BASE"; exit 1; } + docker run -d \ + --name=emby \ + --net=lsio \ + -e PUID=1000 \ + -e PGID=1000 \ + -e TZ="$(cat /etc/timezone)" \ + -p 8096:8096 \ + -v "${EMBY_BASE}/emby/library:/config" \ + -v "${EMBY_BASE}/movies:/movies" \ + -v "${EMBY_BASE}/tvshows:/tvshows" \ + --restart unless-stopped \ + lscr.io/linuxserver/emby:latest + for i in $(seq 1 20); do + if docker inspect -f '{{ index .Config.Labels "build_version" }}' emby >/dev/null 2>&1 ; then + break + else + sleep 3 + fi + if [ $i -eq 20 ] ; then + echo -e "\nTimed out waiting for ${title} to start, consult your container logs for more info (\`docker logs emby\`)" + exit 1 + fi + done + ;; + "${commands[1]}") + [[ "${container}" ]] && docker container rm -f "$container" >/dev/null + [[ "${image}" ]] && docker image rm "$image" >/dev/null + ;; + "${commands[2]}") + ${module_options["module_embyserver,feature"]} ${commands[1]} + [[ -n "${EMBY_BASE}" && "${EMBY_BASE}" != "/" ]] && rm -rf "${EMBY_BASE}" + ;; + "${commands[3]}") + if [[ "${container}" && "${image}" ]]; then + return 0 + else + return 1 + fi + ;; + "${commands[4]}") + echo -e "\nUsage: ${module_options["module_embyserver,feature"]} " + echo -e "Commands: ${module_options["module_embyserver,example"]}" + echo "Available commands:" + echo -e "\tinstall\t- Install $title." + echo -e "\tstatus\t- Installation status $title." + echo -e "\tremove\t- Remove $title." + echo -e "\tremove\t- Purge $title." + echo + ;; + *) + ${module_options["module_embyserver,feature"]} ${commands[4]} + ;; + esac +} diff --git a/tools/modules/software/install_haos.sh b/tools/modules/software/module_haos.sh similarity index 70% rename from tools/modules/software/install_haos.sh rename to tools/modules/software/module_haos.sh index 8e02ee41b..4f88ca94e 100644 --- a/tools/modules/software/install_haos.sh +++ b/tools/modules/software/module_haos.sh @@ -1,44 +1,37 @@ -declare -A module_options module_options+=( ["module_haos,author"]="@igorpecovnik" + ["module_haos,maintainer"]="@igorpecovnik" ["module_haos,feature"]="module_haos" - ["module_haos,example"]="help install uninstall" - ["module_haos,desc"]="Hos container install and configure" + ["module_haos,example"]="install remove purge status help" + ["module_haos,desc"]="Install HA supervised container" + ["module_haos,status"]="Active" + ["module_haos,doc_link"]="https://github.com/home-assistant/supervised-installer" + ["module_haos,group"]="HomeAutomation" ["module_haos,port"]="8123" - ["module_haos,status"]="review" + ["module_haos,arch"]="x86-64 arm64 armhf" ) # -# Install haos container +# Install haos supervised # -module_haos() { - +function module_haos() { + local title="haos" + local condition=$(which "$title" 2>/dev/null) if pkg_installed docker-ce; then local container=$(docker container ls -a | mawk '/home-assistant/{print $1}') local image=$(docker image ls -a | mawk '/home-assistant/{print $3}') fi - # Convert the example string to an array local commands IFS=' ' read -r -a commands <<< "${module_options["module_haos,example"]}" + HAOS_BASE="${SOFTWARE_FOLDER}/haos" + case "$1" in "${commands[0]}") - ## help/menu options for the module - echo -e "\nUsage: ${module_options["module_haos,feature"]} " - echo -e "Commands: ${module_options["module_haos,example"]}" - echo "Available commands:" - if [[ "${container}" ]] || [[ "${image}" ]]; then - echo -e "\tstatus\t- Show the status of the $title service." - echo -e "\tremove\t- Remove $title." - else - echo -e " install\t- Install $title." - fi - echo - ;; - install) - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install + [[ -d "$HAOS_BASE" ]] || mkdir -p "$HAOS_BASE" || { echo "Couldn't create storage directory: $HAOS_BASE"; exit 1; } # this hack will allow running it on minimal image, but this has to be done properly in the network section, to allow easy switching systemctl disable systemd-networkd @@ -61,7 +54,7 @@ module_haos() { esac # this we can't put behind wrapper - MACHINE="${MACHINE}" pkg_install homeassistant-supervised os-agent + DATA_SHARE="$HAOS_BASE" MACHINE="${MACHINE}" pkg_install homeassistant-supervised os-agent # workarounding supervisor loosing healthy state https://github.com/home-assistant/supervisor/issues/4381 cat <<- SUPERVISOR_FIX > "/usr/local/bin/supervisor_fix.sh" @@ -98,17 +91,16 @@ module_haos() { echo "extraargs=systemd.unified_cgroup_hierarchy=0 apparmor=1 security=apparmor" >> "/boot/armbianEnv.txt" fi sleep 5 - for s in {1..10};do + for s in {1..50};do for i in {0..100..10}; do j=$i echo "$i" - sleep 1 + sleep 2 done - if [[ -n "$(docker container ls -a | mawk '/hassio-cli/{print $1}')" ]]; then - ha supervisor info --raw-json >/dev/null - if [[ $status -ne 0 ]]; then break; fi + if [[ -n "$(ss | grep ${module_options["module_haos,port"]})" ]]; then + break; fi - done | $DIALOG --gauge "Preparing Home Assistant Supervised\n\nPlease wait! " 10 50 0 + done | $DIALOG --gauge "Preparing Home Assistant Supervised\n\nPlease wait! (can take 15 minutes) " 10 50 0 # enable service systemctl enable supervisor-fix >/dev/null 2>&1 @@ -117,10 +109,8 @@ module_haos() { # restore os-release sed -i "s/^PRETTY_NAME=\".*/PRETTY_NAME=\"${VENDOR} ${REVISION} ($VERSION_CODENAME)\"/g" "/etc/os-release" - # show that its done - $DIALOG --msgbox "Home assistant is available at\n\nhttps://${LOCALIPADD}:8123 " 10 38 ;; - uninstall) + "${commands[1]}") # disable service systemctl disable supervisor-fix >/dev/null 2>&1 systemctl stop supervisor-fix >/dev/null 2>&1 @@ -140,10 +130,29 @@ module_haos() { # restore os-release sed -i "s/^PRETTY_NAME=\".*/PRETTY_NAME=\"${VENDOR} ${REVISION} ($VERSION_CODENAME)\"/g" "/etc/os-release" ;; - status) - [[ "${container}" ]] || [[ "${image}" ]] && return 0 + "${commands[2]}") + ${module_options["module_haos,feature"]} ${commands[1]} + [[ -n "${HAOS_BASE}" && "${HAOS_BASE}" != "/" ]] && rm -rf "${HAOS_BASE}" + ;; + "${commands[3]}") + if [[ "${container}" && "${image}" ]]; then + return 0 + else + return 1 + fi + ;; + "${commands[4]}") + echo -e "\nUsage: ${module_options["module_haos,feature"]} " + echo -e "Commands: ${module_options["module_haos,example"]}" + echo "Available commands:" + echo -e "\tinstall\t- Install $title." + echo -e "\tstatus\t- Installation status $title." + echo -e "\tremove\t- Remove $title." + echo -e "\tpurge\t- Purge $title." + echo + ;; + *) + ${module_options["module_haos,feature"]} ${commands[4]} ;; esac } - -module_haos "$1" diff --git a/tools/modules/software/install_jellyseerr.sh b/tools/modules/software/module_jellyseerr.sh similarity index 85% rename from tools/modules/software/install_jellyseerr.sh rename to tools/modules/software/module_jellyseerr.sh index 8bbf020fd..785a0c78d 100644 --- a/tools/modules/software/install_jellyseerr.sh +++ b/tools/modules/software/module_jellyseerr.sh @@ -1,11 +1,14 @@ module_options+=( ["module_jellyseerr,author"]="@armbian" + ["module_jellyseerr,maintainer"]="@igorpecovnik" ["module_jellyseerr,feature"]="module_jellyseerr" - ["module_jellyseerr,desc"]="Install jellyseerr container" ["module_jellyseerr,example"]="install remove purge status help" - ["module_jellyseerr,port"]="5055" + ["module_jellyseerr,desc"]="Install jellyseerr container" ["module_jellyseerr,status"]="Active" - ["module_jellyseerr,arch"]="x86-64,arm64" + ["module_jellyseerr,doc_link"]="https://docs.jellyseerr.dev/" + ["module_jellyseerr,group"]="Downloaders" + ["module_jellyseerr,port"]="5055" + ["module_jellyseerr,arch"]="x86-64 arm64" ) # # Module jellyseerr @@ -26,10 +29,11 @@ function module_jellyseerr () { case "$1" in "${commands[0]}") - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install [[ -d "$JELLYSEERR_BASE" ]] || mkdir -p "$JELLYSEERR_BASE" || { echo "Couldn't create storage directory: $JELLYSEERR_BASE"; exit 1; } docker run -d \ --name jellyseerr \ + --net=lsio \ -e LOG_LEVEL=debug \ -e TZ="$(cat /etc/timezone)" \ -e PORT=5055 `#optional` \ @@ -54,6 +58,7 @@ function module_jellyseerr () { [[ "${image}" ]] && docker image rm "$image" >/dev/null ;; "${commands[2]}") + ${module_options["module_jellyseerr,feature"]} ${commands[1]} [[ -n "${JELLYSEERR_BASE}" && "${JELLYSEERR_BASE}" != "/" ]] && rm -rf "${JELLYSEERR_BASE}" ;; "${commands[3]}") @@ -73,7 +78,7 @@ function module_jellyseerr () { echo ;; *) - ${module_options["module_jellyseerr,feature"]} ${commands[4]} + ${module_options["module_jellyseerr,feature"]} ${commands[4]} ;; esac } diff --git a/tools/modules/software/install_lidarr.sh b/tools/modules/software/module_lidarr.sh similarity index 81% rename from tools/modules/software/install_lidarr.sh rename to tools/modules/software/module_lidarr.sh index feeada97b..d6abfb07d 100644 --- a/tools/modules/software/install_lidarr.sh +++ b/tools/modules/software/module_lidarr.sh @@ -1,11 +1,14 @@ module_options+=( ["module_lidarr,author"]="@armbian" + ["module_lidarr,maintainer"]="@igorpecovnik" ["module_lidarr,feature"]="module_lidarr" + ["module_lidarr,example"]="install remove purge status help" ["module_lidarr,desc"]="Install lidarr container" - ["module_lidarr,example"]="install remove status help" - ["module_lidarr,port"]="8686" ["module_lidarr,status"]="Active" - ["module_lidarr,arch"]="x86-64,arm64" + ["module_lidarr,doc_link"]="https://wiki.servarr.com/lidarr" + ["module_lidarr,group"]="Downloaders" + ["module_lidarr,port"]="8686" + ["module_lidarr,arch"]="x86-64 arm64" ) # # Module lidarr @@ -26,10 +29,11 @@ function module_lidarr () { case "$1" in "${commands[0]}") - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install [[ -d "$LIDARR_BASE" ]] || mkdir -p "$LIDARR_BASE" || { echo "Couldn't create storage directory: $LIDARR_BASE"; exit 1; } docker run -d \ --name=lidarr \ + --net=lsio \ -e PUID=1000 \ -e PGID=1000 \ -e TZ="$(cat /etc/timezone)" \ @@ -54,26 +58,30 @@ function module_lidarr () { "${commands[1]}") [[ "${container}" ]] && docker container rm -f "$container" >/dev/null [[ "${image}" ]] && docker image rm "$image" >/dev/null - [[ -n "${LIDARR_BASE}" && "${LIDARR_BASE}" != "/" ]] && rm -rf "${LIDARR_BASE}" ;; "${commands[2]}") + ${module_options["module_lidarr,feature"]} ${commands[1]} + [[ -n "${LIDARR_BASE}" && "${LIDARR_BASE}" != "/" ]] && rm -rf "${LIDARR_BASE}" + ;; + "${commands[3]}") if [[ "${container}" && "${image}" ]]; then return 0 else return 1 fi ;; - "${commands[3]}") + "${commands[4]}") echo -e "\nUsage: ${module_options["module_lidarr,feature"]} " echo -e "Commands: ${module_options["module_lidarr,example"]}" echo "Available commands:" echo -e "\tinstall\t- Install $title." echo -e "\tstatus\t- Installation status $title." echo -e "\tremove\t- Remove $title." + echo -e "\tremove\t- Purge $title." echo ;; *) - ${module_options["module_lidarr,feature"]} ${commands[3]} + ${module_options["module_lidarr,feature"]} ${commands[4]} ;; esac } diff --git a/tools/modules/software/install_mariadb.sh b/tools/modules/software/module_mariadb.sh similarity index 89% rename from tools/modules/software/install_mariadb.sh rename to tools/modules/software/module_mariadb.sh index a50f54c9d..032c6bd14 100644 --- a/tools/modules/software/install_mariadb.sh +++ b/tools/modules/software/module_mariadb.sh @@ -1,13 +1,14 @@ module_options+=( - ["module_mariadb,author"]="" + ["module_mariadb,author"]="@igorpecovnik" ["module_mariadb,maintainer"]="@igorpecovnik" - ["module_mariadb,testers"]="@igorpecovnik" ["module_mariadb,feature"]="module_mariadb" - ["module_mariadb,desc"]="Install mariadb container" ["module_mariadb,example"]="install remove purge status help" - ["module_mariadb,port"]="3306" + ["module_mariadb,desc"]="Install mariadb container" ["module_mariadb,status"]="Active" - ["module_mariadb,arch"]="" + ["module_mariadb,doc_link"]="https://mariadb.org/documentation/" + ["module_mariadb,group"]="Database" + ["module_mariadb,port"]="3306" + ["module_mariadb,arch"]="x86-64 arm64" ) # # Module mariadb-PDF @@ -28,7 +29,7 @@ function module_mariadb () { case "$1" in "${commands[0]}") - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install [[ -d "$MARIADB_BASE" ]] || mkdir -p "$MARIADB_BASE" || { echo "Couldn't create storage directory: $MARIADB_BASE"; exit 1; } # get parameters @@ -38,6 +39,7 @@ function module_mariadb () { MYSQL_PASSWORD=$($DIALOG --title "Enter new password for ${MYSQL_USER}" --inputbox "\nHit enter for defaults" 9 50 "armbian" 3>&1 1>&2 2>&3) docker run -d \ --name=mariadb \ + --net=lsio \ -e PUID=1000 \ -e PGID=1000 \ -e TZ="$(cat /etc/timezone)" \ @@ -66,6 +68,7 @@ function module_mariadb () { [[ "${image}" ]] && docker image rm "$image" >/dev/null ;; "${commands[2]}") + ${module_options["module_mariadb,feature"]} ${commands[1]} [[ -n "${MARIADB_BASE}" && "${MARIADB_BASE}" != "/" ]] && rm -rf "${MARIADB_BASE}" ;; "${commands[3]}") @@ -83,11 +86,10 @@ function module_mariadb () { echo -e "\tremove\t- Remove $title." echo -e "\tpurge\t- Purge $title data folder." echo -e "\tstatus\t- Installation status $title." - echo ;; *) - ${module_options["module_mariadb,feature"]} ${commands[4]} + ${module_options["module_mariadb,feature"]} ${commands[4]} ;; esac } diff --git a/tools/modules/software/install_medusa.sh b/tools/modules/software/module_medusa.sh similarity index 81% rename from tools/modules/software/install_medusa.sh rename to tools/modules/software/module_medusa.sh index b74a6a536..e684c4c3e 100644 --- a/tools/modules/software/install_medusa.sh +++ b/tools/modules/software/module_medusa.sh @@ -1,12 +1,14 @@ -declare -A module_options module_options+=( ["module_medusa,author"]="@armbian" + ["module_medusa,maintainer"]="@igorpecovnik" ["module_medusa,feature"]="module_medusa" + ["module_medusa,example"]="install remove purge status help" ["module_medusa,desc"]="Install medusa container" - ["module_medusa,example"]="install remove status help" - ["module_medusa,port"]="8081" ["module_medusa,status"]="Active" - ["module_medusa,arch"]="x86-64,arm64" + ["module_medusa,doc_link"]="https://github.com/pymedusa/Medusa/wiki" + ["module_medusa,group"]="Downloaders" + ["module_medusa,port"]="8081" + ["module_medusa,arch"]="x86-64 arm64" ) # # Install Module medusa @@ -27,10 +29,11 @@ function module_medusa () { case "$1" in "${commands[0]}") - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install [[ -d "$MEDUSA_BASE" ]] || mkdir -p "$MEDUSA_BASE" || { echo "Couldn't create storage directory: $MEDUSA_BASE"; exit 1; } docker run -d \ --name=medusa \ + --net=lsio \ -e PUID=1000 \ -e PGID=1000 \ -e TZ="$(cat /etc/timezone)" \ @@ -55,26 +58,30 @@ function module_medusa () { "${commands[1]}") [[ "${container}" ]] && docker container rm -f "$container" >/dev/null [[ "${image}" ]] && docker image rm "$image" >/dev/null - [[ -n "${MEDUSA_BASE}" && "${MEDUSA_BASE}" != "/" ]] && rm -rf "${MEDUSA_BASE}" ;; "${commands[2]}") + ${module_options["module_medusa,feature"]} ${commands[1]} + [[ -n "${MEDUSA_BASE}" && "${MEDUSA_BASE}" != "/" ]] && rm -rf "${MEDUSA_BASE}" + ;; + "${commands[3]}") if [[ "${container}" && "${image}" ]]; then return 0 else return 1 fi ;; - "${commands[3]}") + "${commands[4]}") echo -e "\nUsage: ${module_options["module_medusa,feature"]} " echo -e "Commands: ${module_options["module_medusa,example"]}" echo "Available commands:" echo -e "\tinstall\t- Install $title." echo -e "\tstatus\t- Installation status $title." echo -e "\tremove\t- Remove $title." + echo -e "\tpurge\t- Purge $title." echo ;; *) - ${module_options["module_medusa,feature"]} ${commands[3]} + ${module_options["module_medusa,feature"]} ${commands[4]} ;; esac } diff --git a/tools/modules/software/install_netdata.sh b/tools/modules/software/module_netdata.sh similarity index 86% rename from tools/modules/software/install_netdata.sh rename to tools/modules/software/module_netdata.sh index 1d3292d5a..f569d97d2 100644 --- a/tools/modules/software/install_netdata.sh +++ b/tools/modules/software/module_netdata.sh @@ -1,11 +1,14 @@ module_options+=( ["module_netdata,author"]="@armbian" + ["module_netdata,maintainer"]="@igorpecovnik" ["module_netdata,feature"]="module_netdata" - ["module_netdata,desc"]="Install netdata container" ["module_netdata,example"]="install remove purge status help" - ["module_netdata,port"]="19999" + ["module_netdata,desc"]="Install netdata container" ["module_netdata,status"]="Active" - ["module_netdata,arch"]="x86-64,arm64" + ["module_netdata,doc_link"]="https://transmissionbt.com/" + ["module_netdata,group"]="Monitoring" + ["module_netdata,port"]="19999" + ["module_netdata,arch"]="x86-64 arm64" ) # # Module netdata @@ -26,11 +29,12 @@ function module_netdata () { case "$1" in "${commands[0]}") - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install [[ -d "$NETDATA_BASE" ]] || mkdir -p "$NETDATA_BASE" || { echo "Couldn't create storage directory: $NETDATA_BASE"; exit 1; } - docker run -d --name=netdata \ + docker run -d \ + --name=netdata \ --pid=host \ - --network=host \ + --net=lsio \ -v "${NETDATA_BASE}/netdataconfig:/etc/netdata" \ -v "${NETDATA_BASE}/netdatalib:/var/lib/netdata" \ -v "${NETDATA_BASE}/netdatacache:/var/cache/netdata" \ @@ -65,6 +69,7 @@ function module_netdata () { [[ "${image}" ]] && docker image rm "$image" >/dev/null ;; "${commands[2]}") + ${module_options["module_netdata,feature"]} ${commands[1]} [[ -n "${NETDATA_BASE}" && "${NETDATA_BASE}" != "/" ]] && rm -rf "${NETDATA_BASE}" ;; "${commands[3]}") @@ -84,7 +89,7 @@ function module_netdata () { echo ;; *) - ${module_options["module_netdata,feature"]} ${commands[4]} + ${module_options["module_netdata,feature"]} ${commands[4]} ;; esac } diff --git a/tools/modules/software/install_nextcloud.sh b/tools/modules/software/module_nextcloud.sh similarity index 85% rename from tools/modules/software/install_nextcloud.sh rename to tools/modules/software/module_nextcloud.sh index a771a9ed3..4007b6b81 100644 --- a/tools/modules/software/install_nextcloud.sh +++ b/tools/modules/software/module_nextcloud.sh @@ -1,13 +1,14 @@ module_options+=( - ["module_nextcloud,author"]="" + ["module_nextcloud,author"]="@igorpecovnik" ["module_nextcloud,maintainer"]="@igorpecovnik" - ["module_nextcloud,testers"]="@igorpecovnik" ["module_nextcloud,feature"]="module_nextcloud" - ["module_nextcloud,desc"]="Install nextcloud container" ["module_nextcloud,example"]="install remove purge status help" - ["module_nextcloud,port"]="443" + ["module_nextcloud,desc"]="Install nextcloud container" ["module_nextcloud,status"]="Active" - ["module_nextcloud,arch"]="x86-64,arm64" + ["module_nextcloud,doc_link"]="https://nextcloud.com/support/" + ["module_nextcloud,group"]="Downloaders" + ["module_nextcloud,port"]="443" + ["module_nextcloud,arch"]="x86-64 arm64" ) # # Module nextcloud @@ -28,10 +29,11 @@ function module_nextcloud () { case "$1" in "${commands[0]}") - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install [[ -d "$NEXTCLOUD_BASE" ]] || mkdir -p "$NEXTCLOUD_BASE" || { echo "Couldn't create storage directory: $NEXTCLOUD_BASE"; exit 1; } docker run -d \ --name=nextcloud \ + --net=lsio \ -e PUID=1000 \ -e PGID=1000 \ -e TZ="$(cat /etc/timezone)" \ @@ -57,6 +59,7 @@ function module_nextcloud () { [[ "${image}" ]] && docker image rm "$image" >/dev/null ;; "${commands[2]}") + ${module_options["module_nextcloud,feature"]} ${commands[1]} [[ -n "${NEXTCLOUD_BASE}" && "${NEXTCLOUD_BASE}" != "/" ]] && rm -rf "${NEXTCLOUD_BASE}" ;; "${commands[3]}") @@ -78,7 +81,7 @@ function module_nextcloud () { echo ;; *) - ${module_options["module_nextcloud,feature"]} ${commands[4]} + ${module_options["module_nextcloud,feature"]} ${commands[4]} ;; esac } diff --git a/tools/modules/software/module_openhab.sh b/tools/modules/software/module_openhab.sh new file mode 100644 index 000000000..6e4b62938 --- /dev/null +++ b/tools/modules/software/module_openhab.sh @@ -0,0 +1,66 @@ +module_options+=( + ["module_openhab,author"]="@igorpecovnik" + ["module_openhab,maintainer"]="@igorpecovnik" + ["module_openhab,feature"]="module_openhab" + ["module_openhab,example"]="install remove purge status help" + ["module_openhab,desc"]="Install Openhab" + ["module_openhab,status"]="Active" + ["module_openhab,doc_link"]="https://www.openhab.org/docs/tutorial" + ["module_openhab,group"]="HomeAutomation" + ["module_openhab,port"]="8080" + ["module_openhab,arch"]="x86-64 arm64 armhf" +) +# +# Install openHAB from repo using apt +# +function module_openhab() { + + local title="openhab" + local condition=$(which "$title" 2>/dev/null) + + local commands + IFS=' ' read -r -a commands <<< "${module_options["module_openhab,example"]}" + + case "$1" in + "${commands[0]}") + wget -qO - https://repos.azul.com/azul-repo.key | gpg --dearmor > "/usr/share/keyrings/azul.gpg" + wget -qO - https://openhab.jfrog.io/artifactory/api/gpg/key/public | gpg --dearmor > "/usr/share/keyrings/openhab.gpg" + echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" > "/etc/apt/sources.list.d/zulu.list" + echo "deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main" > "/etc/apt/sources.list.d/openhab.list" + pkg_update + pkg_install zulu17-jdk + pkg_install openhab openhab-addons + systemctl daemon-reload 2> /dev/null + service enable openhab.service 2> /dev/null + service start openhab.service 2> /dev/null + ;; + "${commands[1]}") + pkg_remove zulu17-jdk openhab openhab-addons + rm -f /usr/share/keyrings/openhab.gpg /usr/share/keyrings/azul.gpg + rm -f /etc/apt/sources.list.d/zulu.list /etc/apt/sources.list.d/openhab.list + ;; + "${commands[2]}") + ${module_options["module_openhab,feature"]} ${commands[1]} + ;; + "${commands[3]}") + if pkg_installed openhab; then + return 0 + else + return 1 + fi + ;; + "${commands[4]}") + echo -e "\nUsage: ${module_options["module_openhab,feature"]} " + echo -e "Commands: ${module_options["module_openhab,example"]}" + echo "Available commands:" + echo -e "\tinstall\t- Install $title." + echo -e "\tstatus\t- Installation status $title." + echo -e "\tremove\t- Remove $title." + echo -e "\tpurge\t- Purge $title." + echo + ;; + *) + ${module_options["module_haos,feature"]} ${commands[4]} + ;; + esac +} diff --git a/tools/modules/software/install_owncloud.sh b/tools/modules/software/module_owncloud.sh similarity index 86% rename from tools/modules/software/install_owncloud.sh rename to tools/modules/software/module_owncloud.sh index 78c55c15e..175e105f7 100644 --- a/tools/modules/software/install_owncloud.sh +++ b/tools/modules/software/module_owncloud.sh @@ -1,11 +1,14 @@ module_options+=( ["module_owncloud,author"]="@armbian" + ["module_owncloud,maintainer"]="@igorpecovnik" ["module_owncloud,feature"]="module_owncloud" - ["module_owncloud,desc"]="Install owncloud container" ["module_owncloud,example"]="install remove purge status help" - ["module_owncloud,port"]="7787" + ["module_owncloud,desc"]="Install owncloud container" ["module_owncloud,status"]="Active" - ["module_owncloud,arch"]="x86-64,arm64" + ["module_owncloud,doc_link"]="https://doc.owncloud.com/" + ["module_owncloud,group"]="Database" + ["module_owncloud,port"]="7787" + ["module_owncloud,arch"]="x86-64 arm64" ) # # Module owncloud @@ -26,10 +29,11 @@ function module_owncloud () { case "$1" in "${commands[0]}") - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install [[ -d "$OWNCLOUD_BASE" ]] || mkdir -p "$OWNCLOUD_BASE" || { echo "Couldn't create storage directory: $OWNCLOUD_BASE"; exit 1; } docker run -d \ --name=owncloud \ + --net=lsio \ -e PUID=1000 \ -e PGID=1000 \ -e TZ="$(cat /etc/timezone)" \ @@ -56,6 +60,7 @@ function module_owncloud () { [[ "${image}" ]] && docker image rm "$image" >/dev/null ;; "${commands[2]}") + ${module_options["module_owncloud,feature"]} ${commands[1]} [[ -n "${OWNCLOUD_BASE}" && "${OWNCLOUD_BASE}" != "/" ]] && rm -rf "${OWNCLOUD_BASE}" ;; "${commands[3]}") @@ -76,7 +81,7 @@ function module_owncloud () { echo ;; *) - ${module_options["module_owncloud,feature"]} ${commands[4]} + ${module_options["module_owncloud,feature"]} ${commands[4]} ;; esac } diff --git a/tools/modules/software/install_phpmyadmin.sh b/tools/modules/software/module_phpmyadmin.sh similarity index 85% rename from tools/modules/software/install_phpmyadmin.sh rename to tools/modules/software/module_phpmyadmin.sh index 233df4bd9..6b6062c32 100644 --- a/tools/modules/software/install_phpmyadmin.sh +++ b/tools/modules/software/module_phpmyadmin.sh @@ -1,13 +1,14 @@ module_options+=( - ["module_phpmyadmin,author"]="" + ["module_phpmyadmin,author"]="@igorpecovnik" ["module_phpmyadmin,maintainer"]="@igorpecovnik" - ["module_phpmyadmin,testers"]="@igorpecovnik" ["module_phpmyadmin,feature"]="module_phpmyadmin" - ["module_phpmyadmin,desc"]="Install phpmyadmin container" ["module_phpmyadmin,example"]="install remove purge status help" - ["module_phpmyadmin,port"]="8071" + ["module_phpmyadmin,desc"]="Install phpmyadmin container" ["module_phpmyadmin,status"]="Active" - ["module_phpmyadmin,arch"]="" + ["module_phpmyadmin,doc_link"]="https://www.phpmyadmin.net/docs/" + ["module_phpmyadmin,group"]="Database" + ["module_phpmyadmin,port"]="8071" + ["module_phpmyadmin,arch"]="x86-64 arm64" ) # # Module phpmyadmin-PDF @@ -28,10 +29,11 @@ function module_phpmyadmin () { case "$1" in "${commands[0]}") - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install [[ -d "$PHPMYADMIN_BASE" ]] || mkdir -p "$PHPMYADMIN_BASE" || { echo "Couldn't create storage directory: $PHPMYADMIN_BASE"; exit 1; } docker run -d \ --name=phpmyadmin \ + --net=lsio \ -e PUID=1000 \ -e PGID=1000 \ -e TZ="$(cat /etc/timezone)" \ @@ -57,6 +59,7 @@ function module_phpmyadmin () { [[ "${image}" ]] && docker image rm "$image" >/dev/null ;; "${commands[2]}") + ${module_options["module_phpmyadmin,feature"]} ${commands[1]} [[ -n "${PHPMYADMIN_BASE}" && "${PHPMYADMIN_BASE}" != "/" ]] && rm -rf "${PHPMYADMIN_BASE}" ;; "${commands[3]}") @@ -78,7 +81,7 @@ function module_phpmyadmin () { echo ;; *) - ${module_options["module_phpmyadmin,feature"]} ${commands[4]} + ${module_options["module_phpmyadmin,feature"]} ${commands[4]} ;; esac } diff --git a/tools/modules/software/module_pi-hole.sh b/tools/modules/software/module_pi-hole.sh new file mode 100644 index 000000000..a4842b395 --- /dev/null +++ b/tools/modules/software/module_pi-hole.sh @@ -0,0 +1,115 @@ +module_options+=( + ["module_pi_hole,author"]="@armbian" + ["module_pi_hole,maintainer"]="@igorpecovnik" + ["module_pi_hole,feature"]="module_pi_hole" + ["module_pi_hole,example"]="install remove purge password status help" + ["module_pi_hole,desc"]="Install Pi-hole container" + ["module_pi_hole,status"]="Active" + ["module_pi_hole,doc_link"]="https://docs.pi-hole.net/" + ["module_pi_hole,group"]="DNS" + ["module_pi_hole,port"]="80 53" + ["module_pi_hole,arch"]="x86-64 arm64" +) +# +# Module Pi-Hole +# +function module_pi_hole () { + local title="pihole" + local condition=$(which "$title" 2>/dev/null) + + if pkg_installed docker-ce; then + local container=$(docker container ls -a | mawk '/pihole?( |$)/{print $1}') + local image=$(docker image ls -a | mawk '/pihole?( |$)/{print $3}') + fi + local commands + IFS=' ' read -r -a commands <<< "${module_options["module_pi_hole,example"]}" + + PIHOLE_BASE="${SOFTWARE_FOLDER}/pihole" + + case "$1" in + "${commands[0]}") + pkg_installed docker-ce || module_docker install + [[ -d "$PIHOLE_BASE" ]] || mkdir -p "$PIHOLE_BASE" || { echo "Couldn't create storage directory: $PIHOLE_BASE"; exit 1; } + # disable dns within systemd-resolved + if systemctl is-active --quiet systemd-resolved.service; then + # Debian doesn't enable this file by default + [[ ! -f /etc/systemd/resolved.conf ]] && ln -s /etc/systemd/resolved.conf.real /etc/systemd/resolved.conf + if ! grep -q "^DNSStubListener=no" /etc/systemd/resolved.conf 2> /dev/null; then + sed -i "s/^#\?DNSStubListener=.*/DNSStubListener=no/" /etc/systemd/resolved.conf + systemctl restart systemd-resolved.service + sleep 3 + fi + fi + # disable dns within Network manager + if systemctl is-active --quiet NetworkManager && [[ -f /etc/NetworkManager/NetworkManager.conf ]]; then + if grep -q "dns=true" /etc/NetworkManager/NetworkManager.conf; then + sed -i "s/dns=.*/dns=false/g" /etc/NetworkManager/NetworkManager.conf + systemctl restart NetworkManager + sleep 3 + fi + fi + docker run -d \ + --name pihole \ + --net=lsio \ + -p 53:53/tcp -p 53:53/udp \ + -p 80:80 \ + -e TZ="$(cat /etc/timezone)" \ + -v "${PIHOLE_BASE}/etc-pihole:/etc/pihole" \ + -v "${PIHOLE_BASE}/etc-dnsmasq.d:/etc/dnsmasq.d" \ + --dns=9.9.9.9 \ + --restart=unless-stopped \ + --hostname pi.hole \ + -e VIRTUAL_HOST="pi.hole" \ + -e PROXY_LOCATION="pi.hole" \ + -e FTLCONF_LOCAL_IPV4="${LOCALIPADD}" \ + pihole/pihole:latest + for i in $(seq 1 20); do + if docker inspect -f '{{ index .Config.Labels "build_version" }}' pihole >/dev/null 2>&1 ; then + break + else + sleep 3 + fi + if [ $i -eq 20 ] ; then + echo -e "\nTimed out waiting for ${title} to start, consult your container logs for more info (\`docker logs pihole\`)" + exit 1 + fi + done + ;; + "${commands[1]}") + [[ "${container}" ]] && docker container rm -f "$container" >/dev/null + [[ "${image}" ]] && docker image rm "$image" >/dev/null + ;; + "${commands[2]}") + ${module_options["module_pi_hole,feature"]} ${commands[1]} + [[ -n "${PIHOLE_BASE}" && "${PIHOLE_BASE}" != "/" ]] && rm -rf "${PIHOLE_BASE}" + ;; + "${commands[3]}") + SELECTED_PASSWORD=$($DIALOG --title "Enter new password for Pi-hole admin" --passwordbox "" 7 50 3>&1 1>&2 2>&3) + if [[ -n $SELECTED_PASSWORD ]]; then + docker exec -it "${container}" sh -c "sudo pihole -a -p ${SELECTED_PASSWORD}" >/dev/null + fi + ;; + "${commands[4]}") + if [[ "${container}" && "${image}" ]]; then + return 0 + else + return 1 + fi + ;; + "${commands[5]}") + echo -e "\nUsage: ${module_options["module_pi_hole,feature"]} " + echo -e "Commands: ${module_options["module_pi_hole,example"]}" + echo "Available commands:" + echo -e "\tinstall\t- Install $title." + echo -e "\tremove\t- Remove $title." + echo -e "\tpurge\t- Purge $title." + echo -e "\tstatus\t- Installation status $title." + echo -e "\tpassword\t- Set webadmin password $title." + echo + ;; + *) + ${module_options["module_pi_hole,feature"]} ${commands[5]} + ;; + esac +} + diff --git a/tools/modules/software/module_plexmediaserver.sh b/tools/modules/software/module_plexmediaserver.sh new file mode 100644 index 000000000..6c6c51077 --- /dev/null +++ b/tools/modules/software/module_plexmediaserver.sh @@ -0,0 +1,64 @@ +module_options+=( + ["module_plexmediaserver,author"]="@schwar3kat" + ["module_plexmediaserver,maintainer"]="@igorpecovnik" + ["module_plexmediaserver,feature"]="Install plexmediaserver" + ["module_plexmediaserver,example"]="install remove status" + ["module_plexmediaserver,desc"]="Install plexmediaserver from repo using apt" + ["module_plexmediaserver,status"]="Active" + ["module_plexmediaserver,doc_link"]="https://www.plex.tv/" + ["module_plexmediaserver,group"]="Media" + ["module_plexmediaserver,port"]="32400" + ["module_plexmediaserver,arch"]="x86-64 arm64" + +) +# +# Install plexmediaserver using apt +# +module_plexmediaserver() { + local title="plexmediaserver" + local condition=$(which "$title" 2>/dev/null) + + local commands + IFS=' ' read -r -a commands <<< "${module_options["module_plexmediaserver,example"]}" + + case "$1" in + "${commands[0]}") + if [ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]; then + echo "deb [arch=$(dpkg --print-architecture) \ + signed-by=/usr/share/keyrings/plexmediaserver.gpg] https://downloads.plex.tv/repo/deb public main" \ + | sudo tee /etc/apt/sources.list.d/plexmediaserver.list > /dev/null 2>&1 + else + sed -i "/downloads.plex.tv/s/^#//g" /etc/apt/sources.list.d/plexmediaserver.list > /dev/null 2>&1 + fi + # Note: for compatibility with existing source file in some builds format must be gpg not asc + # and location must be /usr/share/keyrings + wget -qO- https://downloads.plex.tv/plex-keys/PlexSign.key | gpg --dearmor \ + | sudo tee /usr/share/keyrings/plexmediaserver.gpg > /dev/null 2>&1 + pkg_update + pkg_install plexmediaserver + ;; + "${commands[1]}") + sed -i '/plexmediaserver.gpg/s/^/#/g' /etc/apt/sources.list.d/plexmediaserver.list + pkg_remove plexmediaserver + ;; + "${commands[2]}") + if pkg_installed plexmediaserver; then + return 0 + else + return 1 + fi + ;; + "${commands[3]}") + echo -e "\nUsage: ${module_options["module_portainer,feature"]} " + echo -e "Commands: ${module_options["module_portainer,example"]}" + echo "Available commands:" + echo -e "\tinstall\t- Install $title." + echo -e "\tstatus\t- Installation status $title." + echo -e "\tremove\t- Remove $title." + echo + ;; + *) + ${module_options["module_plexmediaserver,feature"]} ${commands[3]} + ;; + esac +} diff --git a/tools/modules/software/module_portainer.sh b/tools/modules/software/module_portainer.sh new file mode 100644 index 000000000..c8ff9bd23 --- /dev/null +++ b/tools/modules/software/module_portainer.sh @@ -0,0 +1,85 @@ +module_options+=( + ["module_portainer,author"]="@armbian" + ["module_portainer,maintainer"]="@schwar3kat" + ["module_portainer,feature"]="module_portainer" + ["module_portainer,example"]="install remove purge status help" + ["module_portainer,desc"]="Install/uninstall/check status of portainer container" + ["module_portainer,status"]="Active" + ["module_portainer,doc_link"]="https://docs.portainer.io/" + ["module_portainer,group"]="Containers" + ["module_portainer,port"]="9000 8000 9443" + ["module_portainer,arch"]="x86-64 arm64 armhf" +) +# +# Install Portainer +# +module_portainer() { + local title="portainer" + local condition=$(which "$title" 2>/dev/null) + + if pkg_installed docker-ce; then + local container=$(docker container ls -a | mawk '/portainer\/portainer(-ce)?( |$)/{print $1}') + local image=$(docker image ls -a | mawk '/portainer\/portainer(-ce)?( |$)/{print $3}') + fi + + local commands + IFS=' ' read -r -a commands <<< "${module_options["module_portainer,example"]}" + + PORTAINER_BASE="${SOFTWARE_FOLDER}/portainer" + + case "$1" in + "${commands[0]}") + pkg_installed docker-ce || module_docker install + [[ -d "$PORTAINER_BASE" ]] || mkdir -p "$PORTAINER_BASE" || { echo "Couldn't create storage directory: $PORTAINER_BASE"; exit 1; } + docker volume ls -q | grep -xq 'portainer_data' || docker volume create portainer_data + docker run -d \ + --name=portainer \ + -p '9000:9000' \ + -p '8000:8000' \ + -p '9443:9443' \ + -v '/run/docker.sock:/var/run/docker.sock' \ + -v "${PORTAINER_BASE}/data:/data" \ + --restart=always \ + portainer/portainer-ce + #-v '/etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt:ro' \ + for i in $(seq 1 20); do + if docker inspect -f '{{ index .Config.Labels "build_version" }}' portainer >/dev/null 2>&1 ; then + break + else + sleep 3 + fi + if [ $i -eq 20 ] ; then + echo -e "\nTimed out waiting for ${title} to start, consult your container logs for more info (\`docker logs portainer\`)" + exit 1 + fi + done + ;; + "${commands[1]}") + [[ "${container}" ]] && docker container rm -f "$container" >/dev/null + [[ "${image}" ]] && docker image rm "$image" >/dev/null + ;; + "${commands[2]}") + ${module_options["module_portainer,feature"]} ${commands[1]} + [[ -n "${PORTAINER_BASE}" && "${PORTAINER_BASE}" != "/" ]] && rm -rf "${PORTAINER_BASE}" + ;; + "${commands[3]}") + if [[ "${container}" && "${image}" ]]; then + return 0 + else + return 1 + fi + ;; + "${commands[4]}") + echo -e "\nUsage: ${module_options["module_portainer,feature"]} " + echo -e "Commands: ${module_options["module_portainer,example"]}" + echo "Available commands:" + echo -e "\tinstall\t- Install $title." + echo -e "\tstatus\t- Installation status $title." + echo -e "\tremove\t- Remove $title." + echo + ;; + *) + ${module_options["module_portainer,feature"]} ${commands[4]} + ;; + esac +} diff --git a/tools/modules/software/install_prowlarr.sh b/tools/modules/software/module_prowlarr.sh similarity index 79% rename from tools/modules/software/install_prowlarr.sh rename to tools/modules/software/module_prowlarr.sh index 5721d9bf9..5bc07164e 100644 --- a/tools/modules/software/install_prowlarr.sh +++ b/tools/modules/software/module_prowlarr.sh @@ -1,11 +1,14 @@ module_options+=( - ["module_prowlarr,author"]="@armbian" + ["module_prowlarr,author"]="@Prowlarr" + ["module_prowlarr,maintainer"]="@armbian" ["module_prowlarr,feature"]="module_prowlarr" + ["module_prowlarr,example"]="install remove purge status help" ["module_prowlarr,desc"]="Install prowlarr container" - ["module_prowlarr,example"]="install remove status help" - ["module_prowlarr,port"]="9696" ["module_prowlarr,status"]="Active" - ["module_prowlarr,arch"]="x86-64,arm64" + ["module_prowlarr,doc_link"]="https://prowlarr.com/" + ["module_prowlarr,group"]="Database" + ["module_prowlarr,port"]="9696" + ["module_prowlarr,arch"]="x86-64 arm64" ) # # Module prowlarr @@ -26,10 +29,11 @@ function module_prowlarr () { case "$1" in "${commands[0]}") - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install [[ -d "$PROWLARR_BASE" ]] || mkdir -p "$PROWLARR_BASE" || { echo "Couldn't create storage directory: $PROWLARR_BASE"; exit 1; } docker run -d \ --name=prowlarr \ + --net=lsio \ -e PUID=1000 \ -e PGID=1000 \ -e TZ="$(cat /etc/timezone)" \ @@ -52,26 +56,30 @@ function module_prowlarr () { "${commands[1]}") [[ "${container}" ]] && docker container rm -f "$container" >/dev/null [[ "${image}" ]] && docker image rm "$image" >/dev/null - [[ -n "${PROWLARR_BASE}" && "${PROWLARR_BASE}" != "/" ]] && rm -rf "${PROWLARR_BASE}" ;; "${commands[2]}") + ${module_options["module_prowlarr,feature"]} ${commands[1]} + [[ -n "${PROWLARR_BASE}" && "${PROWLARR_BASE}" != "/" ]] && rm -rf "${PROWLARR_BASE}" + ;; + "${commands[3]}") if [[ "${container}" && "${image}" ]]; then return 0 else return 1 fi ;; - "${commands[3]}") + "${commands[4]}") echo -e "\nUsage: ${module_options["module_prowlarr,feature"]} " echo -e "Commands: ${module_options["module_prowlarr,example"]}" echo "Available commands:" echo -e "\tinstall\t- Install $title." echo -e "\tstatus\t- Installation status $title." echo -e "\tremove\t- Remove $title." + echo -e "\tpurge\t- Purge $title." echo ;; *) - ${module_options["module_prowlarr,feature"]} ${commands[3]} + ${module_options["module_prowlarr,feature"]} ${commands[4]} ;; esac } diff --git a/tools/modules/software/install_qbittorrent.sh b/tools/modules/software/module_qbittorrent.sh similarity index 77% rename from tools/modules/software/install_qbittorrent.sh rename to tools/modules/software/module_qbittorrent.sh index 3cce262db..98226a7e0 100644 --- a/tools/modules/software/install_qbittorrent.sh +++ b/tools/modules/software/module_qbittorrent.sh @@ -1,12 +1,14 @@ -declare -A module_options module_options+=( - ["module_qbittorrent,author"]="@armbian" + ["module_qbittorrent,author"]="@qbittorrent" + ["module_qbittorrent,maintainer"]="@igorpecovnik" ["module_qbittorrent,feature"]="module_qbittorrent" + ["module_qbittorrent,example"]="install remove purge status help" ["module_qbittorrent,desc"]="Install qbittorrent container" - ["module_qbittorrent,example"]="install remove status help" - ["module_qbittorrent,port"]="8090 6881" ["module_qbittorrent,status"]="Active" - ["module_qbittorrent,arch"]="x86-64,arm64" + ["module_qbittorrent,doc_link"]="https://github.com/qbittorrent/qBittorrent/wiki/" + ["module_qbittorrent,group"]="Downloaders" + ["module_qbittorrent,port"]="8090 6881" + ["module_qbittorrent,arch"]="x86-64 arm64" ) # # Module qbittorrent @@ -25,10 +27,11 @@ function module_qbittorrent () { case "$1" in "${commands[0]}") - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install [[ -d "$QBITTORRENT_BASE" ]] || mkdir -p "$QBITTORRENT_BASE" || { echo "Couldn't create storage directory: $QBITTORRENT_BASE"; exit 1; } docker run -d \ --name=qbittorrent \ + --net=lsio \ -e PUID=1000 \ -e PGID=1000 \ -e TZ="$(cat /etc/timezone)" \ @@ -54,31 +57,35 @@ function module_qbittorrent () { done sleep 3 TEMP_PASSWORD=$(docker logs qbittorrent 2>&1 | grep password | grep session | cut -d":" -f2 | xargs) - dialog --msgbox "Qbittorrent is listening at http://$LOCALIPADD:${module_options["module_qbittorrent,port"]}\n\nLogin as: admin\n\nTemporally password: ${TEMP_PASSWORD} " 9 70 + dialog --msgbox "Qbittorrent is listening at http://$LOCALIPADD:${module_options["module_qbittorrent,port"]% *}\n\nLogin as: admin\n\nTemporally password: ${TEMP_PASSWORD} " 9 70 ;; "${commands[1]}") [[ "${container}" ]] && docker container rm -f "$container" >/dev/null [[ "${image}" ]] && docker image rm "$image" >/dev/null - [[ -n "${QBITTORRENT_BASE}" && "${QBITTORRENT_BASE}" != "/" ]] && rm -rf "${QBITTORRENT_BASE}" ;; "${commands[2]}") + ${module_options["module_qbittorrent,feature"]} ${commands[1]} + [[ -n "${QBITTORRENT_BASE}" && "${QBITTORRENT_BASE}" != "/" ]] && rm -rf "${QBITTORRENT_BASE}" + ;; + "${commands[3]}") if [[ "${container}" && "${image}" ]]; then return 0 else return 1 fi ;; - "${commands[3]}") + "${commands[4]}") echo -e "\nUsage: ${module_options["module_qbittorrent,feature"]} " echo -e "Commands: ${module_options["module_qbittorrent,example"]}" echo "Available commands:" echo -e "\tinstall\t- Install $title." echo -e "\tstatus\t- Installation status $title." echo -e "\tremove\t- Remove $title." + echo -e "\tpurge\t- Remove $title." echo ;; *) - ${module_options["module_qbittorrent,feature"]} ${commands[3]} + ${module_options["module_qbittorrent,feature"]} ${commands[4]} ;; esac } diff --git a/tools/modules/software/install_radarr.sh b/tools/modules/software/module_radarr.sh similarity index 82% rename from tools/modules/software/install_radarr.sh rename to tools/modules/software/module_radarr.sh index 537fc40d7..69772888a 100644 --- a/tools/modules/software/install_radarr.sh +++ b/tools/modules/software/module_radarr.sh @@ -1,11 +1,14 @@ module_options+=( ["module_radarr,author"]="@armbian" + ["module_radarr,maintainer"]="@igorpecovnik" ["module_radarr,feature"]="module_radarr" + ["module_radarr,example"]="install remove purge status help" ["module_radarr,desc"]="Install radarr container" - ["module_radarr,example"]="install remove status help" - ["module_radarr,port"]="7878" ["module_radarr,status"]="Active" - ["module_radarr,arch"]="x86-64,arm64" + ["module_radarr,doc_link"]="https://wiki.servarr.com/radarr" + ["module_radarr,group"]="Downloaders" + ["module_radarr,port"]="7878" + ["module_radarr,arch"]="x86-64 arm64" ) # # Module radarr @@ -26,10 +29,11 @@ function module_radarr () { case "$1" in "${commands[0]}") - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install [[ -d "$RADARR_BASE" ]] || mkdir -p "$RADARR_BASE" || { echo "Couldn't create storage directory: $RADARR_BASE"; exit 1; } docker run -d \ --name=radarr \ + --net=lsio \ -e PUID=1000 \ -e PGID=1000 \ -e TZ="$(cat /etc/timezone)" \ @@ -54,16 +58,19 @@ function module_radarr () { "${commands[1]}") [[ "${container}" ]] && docker container rm -f "$container" >/dev/null [[ "${image}" ]] && docker image rm "$image" >/dev/null - [[ -n "${RADARR_BASE}" && "${RADARR_BASE}" != "/" ]] && rm -rf "${RADARR_BASE}" ;; "${commands[2]}") + ${module_options["module_radarr,feature"]} ${commands[1]} + [[ -n "${RADARR_BASE}" && "${RADARR_BASE}" != "/" ]] && rm -rf "${RADARR_BASE}" + ;; + "${commands[3]}") if [[ "${container}" && "${image}" ]]; then return 0 else return 1 fi ;; - "${commands[3]}") + "${commands[4]}") echo -e "\nUsage: ${module_options["module_radarr,feature"]} " echo -e "Commands: ${module_options["module_radarr,example"]}" echo "Available commands:" @@ -73,7 +80,7 @@ function module_radarr () { echo ;; *) - ${module_options["module_radarr,feature"]} ${commands[3]} + ${module_options["module_radarr,feature"]} ${commands[4]} ;; esac } diff --git a/tools/modules/software/install_readarr.sh b/tools/modules/software/module_readarr.sh similarity index 80% rename from tools/modules/software/install_readarr.sh rename to tools/modules/software/module_readarr.sh index b32ba5ab4..e9eafa93b 100644 --- a/tools/modules/software/install_readarr.sh +++ b/tools/modules/software/module_readarr.sh @@ -1,11 +1,14 @@ module_options+=( ["module_readarr,author"]="@armbian" + ["module_readarr,maintainer"]="@igorpecovnik" ["module_readarr,feature"]="module_readarr" + ["module_readarr,example"]="install remove purge status help" ["module_readarr,desc"]="Install readarr container" - ["module_readarr,example"]="install remove status help" - ["module_readarr,port"]="8787" ["module_readarr,status"]="Active" - ["module_readarr,arch"]="x86-64,arm64" + ["module_readarr,doc_link"]="https://wiki.servarr.com/readarr" + ["module_readarr,group"]="Downloaders" + ["module_readarr,port"]="8787" + ["module_readarr,arch"]="x86-64 arm64" ) # # Module readarr @@ -26,13 +29,14 @@ function module_readarr () { case "$1" in "${commands[0]}") - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install [[ -d "$READARR_BASE" ]] || mkdir -p "$READARR_BASE" || { echo "Couldn't create storage directory: $READARR_BASE"; exit 1; } docker run -d \ --name=readarr \ + --net=lsio \ -e PUID=1000 \ -e PGID=1000 \ - -e TZ=Etc/UTC \ + -e TZ="$(cat /etc/timezone)" \ -p 8787:8787 \ -v "${READARR_BASE}/config:/config" \ -v "${READARR_BASE}/books:/books" `#optional` \ @@ -54,26 +58,30 @@ function module_readarr () { "${commands[1]}") [[ "${container}" ]] && docker container rm -f "$container" >/dev/null [[ "${image}" ]] && docker image rm "$image" >/dev/null - [[ -n "${READARR_BASE}" && "${READARR_BASE}" != "/" ]] && rm -rf "${READARR_BASE}" ;; "${commands[2]}") + ${module_options["module_readarr,feature"]} ${commands[1]} + [[ -n "${READARR_BASE}" && "${READARR_BASE}" != "/" ]] && rm -rf "${READARR_BASE}" + ;; + "${commands[3]}") if [[ "${container}" && "${image}" ]]; then return 0 else return 1 fi ;; - "${commands[3]}") + "${commands[4]}") echo -e "\nUsage: ${module_options["module_readarr,feature"]} " echo -e "Commands: ${module_options["module_readarr,example"]}" echo "Available commands:" echo -e "\tinstall\t- Install $title." echo -e "\tstatus\t- Installation status $title." echo -e "\tremove\t- Remove $title." + echo -e "\tpurge\t- Purge $title." echo ;; *) - ${module_options["module_readarr,feature"]} ${commands[3]} + ${module_options["module_readarr,feature"]} ${commands[4]} ;; esac } diff --git a/tools/modules/software/install_sabnzbd.sh b/tools/modules/software/module_sabnzbd.sh similarity index 80% rename from tools/modules/software/install_sabnzbd.sh rename to tools/modules/software/module_sabnzbd.sh index 31acc168a..d418bac77 100644 --- a/tools/modules/software/install_sabnzbd.sh +++ b/tools/modules/software/module_sabnzbd.sh @@ -1,17 +1,20 @@ module_options+=( ["module_sabnzbd,author"]="@armbian" + ["module_sabnzbd,maintainer"]="@igorpecovnik" ["module_sabnzbd,feature"]="module_sabnzbd" + ["module_sabnzbd,example"]="install remove purge status help" ["module_sabnzbd,desc"]="Install sabnzbd container" - ["module_sabnzbd,example"]="install remove status help" - ["module_sabnzbd,port"]="8080" ["module_sabnzbd,status"]="Active" - ["module_sabnzbd,arch"]="x86-64,arm64" + ["module_sabnzbd,doc_link"]="https://sabnzbd.org/wiki/faq" + ["module_sabnzbd,group"]="Downloaders" + ["module_sabnzbd,port"]="8080" + ["module_sabnzbd,arch"]="x86-64 arm64" ) # # Module Sabnzbd # function module_sabnzbd () { - local title="Sabnzbd" + local title="sabnzbd" local condition=$(which "$title" 2>/dev/null) if pkg_installed docker-ce; then @@ -26,10 +29,11 @@ function module_sabnzbd () { case "$1" in "${commands[0]}") - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install [[ -d "$SABNZBD_BASE" ]] || mkdir -p "$SABNZBD_BASE" || { echo "Couldn't create storage directory: $SABNZBD_BASE"; exit 1; } docker run -d \ --name=sabnzbd \ + --net=lsio \ -e PUID=1000 \ -e PGID=1000 \ -e TZ="$(cat /etc/timezone)" \ @@ -54,26 +58,30 @@ function module_sabnzbd () { "${commands[1]}") [[ "${container}" ]] && docker container rm -f "$container" >/dev/null [[ "${image}" ]] && docker image rm "$image" >/dev/null - [[ -n "${SABNZBD_BASE}" && "${SABNZBD_BASE}" != "/" ]] && rm -rf "${SABNZBD_BASE}" ;; "${commands[2]}") + ${module_options["module_sabnzbd,feature"]} ${commands[1]} + [[ -n "${SABNZBD_BASE}" && "${SABNZBD_BASE}" != "/" ]] && rm -rf "${SABNZBD_BASE}" + ;; + "${commands[3]}") if [[ "${container}" && "${image}" ]]; then return 0 else return 1 fi ;; - "${commands[3]}") + "${commands[4]}") echo -e "\nUsage: ${module_options["module_sabnzbd,feature"]} " echo -e "Commands: ${module_options["module_sabnzbd,example"]}" echo "Available commands:" echo -e "\tinstall\t- Install $title." echo -e "\tstatus\t- Installation status $title." echo -e "\tremove\t- Remove $title." + echo -e "\tremove\t- Purge $title." echo ;; *) - ${module_options["module_sabnzbd,feature"]} ${commands[3]} + ${module_options["module_sabnzbd,feature"]} ${commands[4]} ;; esac } diff --git a/tools/modules/software/install_sonarr.sh b/tools/modules/software/module_sonarr.sh similarity index 81% rename from tools/modules/software/install_sonarr.sh rename to tools/modules/software/module_sonarr.sh index 33a2ef6e6..ff7a72d81 100644 --- a/tools/modules/software/install_sonarr.sh +++ b/tools/modules/software/module_sonarr.sh @@ -1,11 +1,14 @@ module_options+=( ["module_sonarr,author"]="@armbian" + ["module_sonarr,maintainer"]="@igorpecovnik" ["module_sonarr,feature"]="module_sonarr" + ["module_sonarr,example"]="install remove purge status help" ["module_sonarr,desc"]="Install sonarr container" - ["module_sonarr,example"]="install remove status help" - ["module_sonarr,port"]="8989" ["module_sonarr,status"]="Active" - ["module_sonarr,arch"]="x86-64,arm64" + ["module_sonarr,doc_link"]="https://transmissionbt.com/" + ["module_sonarr,group"]="Downloaders" + ["module_sonarr,port"]="8989" + ["module_sonarr,arch"]="x86-64 arm64" ) # # Mmodule_sonarr @@ -26,10 +29,11 @@ function module_sonarr () { case "$1" in "${commands[0]}") - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install [[ -d "$SONARR_BASE" ]] || mkdir -p "$SONARR_BASE" || { echo "Couldn't create storage directory: $SONARR_BASE"; exit 1; } docker run -d \ --name=sonarr \ + --net=lsio \ -e PUID=1000 \ -e PGID=1000 \ -e TZ="$(cat /etc/timezone)" \ @@ -54,26 +58,30 @@ function module_sonarr () { "${commands[1]}") [[ "${container}" ]] && docker container rm -f "$container" >/dev/null [[ "${image}" ]] && docker image rm "$image" >/dev/null - [[ -n "${SONARR_BASE}" && "${SONARR_BASE}" != "/" ]] && rm -rf "${SONARR_BASE}" ;; "${commands[2]}") + ${module_options["module_sonarr,feature"]} ${commands[1]} + [[ -n "${SONARR_BASE}" && "${SONARR_BASE}" != "/" ]] && rm -rf "${SONARR_BASE}" + ;; + "${commands[3]}") if [[ "${container}" && "${image}" ]]; then return 0 else return 1 fi ;; - "${commands[3]}") + "${commands[4]}") echo -e "\nUsage: ${module_options["module_sonarr,feature"]} " echo -e "Commands: ${module_options["module_sonarr,example"]}" echo "Available commands:" echo -e "\tinstall\t- Install $title." echo -e "\tstatus\t- Installation status $title." echo -e "\tremove\t- Remove $title." + echo -e "\tpurge\t- Purge $title." echo ;; *) - ${module_options["module_sonarr,feature"]} ${commands[3]} + ${module_options["module_sonarr,feature"]} ${commands[4]} ;; esac } diff --git a/tools/modules/software/install_stirling.sh b/tools/modules/software/module_stirling.sh similarity index 86% rename from tools/modules/software/install_stirling.sh rename to tools/modules/software/module_stirling.sh index 5bc1323f3..cb74b665c 100644 --- a/tools/modules/software/install_stirling.sh +++ b/tools/modules/software/module_stirling.sh @@ -1,13 +1,14 @@ module_options+=( ["module_stirling,author"]="@Frooodle" - ["module_stirling,maintainer"]="@armbian @igorpecovnik" - ["module_stirling,testers"]="@igorpecovnik" + ["module_stirling,maintainer"]="@igorpecovnik" ["module_stirling,feature"]="module_stirling" - ["module_stirling,desc"]="Install stirling container" ["module_stirling,example"]="install remove purge status help" - ["module_stirling,port"]="8077" + ["module_stirling,desc"]="Install stirling container" ["module_stirling,status"]="Active" - ["module_stirling,arch"]="" + ["module_stirling,doc_link"]="https://docs.stirlingpdf.com" + ["module_stirling,group"]="Media" + ["module_stirling,port"]="8077" + ["module_stirling,arch"]="x86-64 arm64" ) # # Module stirling-PDF @@ -28,9 +29,10 @@ function module_stirling () { case "$1" in "${commands[0]}") - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install [[ -d "$STIRLING_BASE" ]] || mkdir -p "$STIRLING_BASE" || { echo "Couldn't create storage directory: $STIRLING_BASE"; exit 1; } docker run -d \ + --net=lsio \ -p 8077:8080 \ -v "${STIRLING_BASE}/trainingData:/usr/share/tessdata" \ -v "${STIRLING_BASE}/extraConfigs:/configs" \ @@ -58,6 +60,7 @@ function module_stirling () { [[ "${image}" ]] && docker image rm "$image" >/dev/null ;; "${commands[2]}") + ${module_options["module_stirling,feature"]} ${commands[1]} [[ -n "${STIRLING_BASE}" && "${STIRLING_BASE}" != "/" ]] && rm -rf "${STIRLING_BASE}" ;; "${commands[3]}") @@ -79,7 +82,7 @@ function module_stirling () { echo ;; *) - ${module_options["module_stirling,feature"]} ${commands[4]} + ${module_options["module_stirling,feature"]} ${commands[4]} ;; esac } diff --git a/tools/modules/software/install_swag.sh b/tools/modules/software/module_swag.sh similarity index 91% rename from tools/modules/software/install_swag.sh rename to tools/modules/software/module_swag.sh index e2cfff10d..ed0f93b9d 100644 --- a/tools/modules/software/install_swag.sh +++ b/tools/modules/software/module_swag.sh @@ -1,9 +1,14 @@ module_options+=( ["module_swag,author"]="@igorpecovnik" + ["module_swag,maintainer"]="@igorpecovnik" ["module_swag,feature"]="module_swag" - ["module_swag,desc"]="Example module unattended interface." ["module_swag,example"]="install remove purge status password help" + ["module_swag,desc"]="Secure Web Application Gateway " ["module_swag,status"]="Active" + ["module_swag,doc_link"]="https://github.com/linuxserver/docker-swag" + ["module_swag,group"]="WebHosting" + ["module_swag,port"]="443" + ["module_swag,arch"]="x86-64 arm64" ) function module_swag() { @@ -32,9 +37,7 @@ function module_swag() { # adjust hostname hostnamectl set-hostname $(echo ${SWAG_URL} | sed -E 's/^\s*.*:\/\///g') # install docker - pkg_installed docker-ce || install_docker - # add additional bridge where containers see each other - docker network create lsio 2> /dev/null + pkg_installed docker-ce || module_docker install [[ -d "$SWAG_BASE" ]] || mkdir -p "$SWAG_BASE" || { echo "Couldn't create storage directory: $SWAG_BASE"; exit 1; } diff --git a/tools/modules/software/install_syncthing.sh b/tools/modules/software/module_syncthing.sh similarity index 85% rename from tools/modules/software/install_syncthing.sh rename to tools/modules/software/module_syncthing.sh index 8999a375b..50034fd09 100644 --- a/tools/modules/software/install_syncthing.sh +++ b/tools/modules/software/module_syncthing.sh @@ -1,13 +1,14 @@ module_options+=( - ["module_syncthing,author"]="" + ["module_syncthing,author"]="@igorpecovnik" ["module_syncthing,maintainer"]="@igorpecovnik" - ["module_syncthing,testers"]="@igorpecovnik" ["module_syncthing,feature"]="module_syncthing" - ["module_syncthing,desc"]="Install syncthing container" ["module_syncthing,example"]="install remove purge status help" - ["module_syncthing,port"]="8884" + ["module_syncthing,desc"]="Install syncthing container" ["module_syncthing,status"]="Active" - ["module_syncthing,arch"]="x86-64,arm64" + ["module_syncthing,doc_link"]="https://docs.syncthing.net/" + ["module_syncthing,group"]="Media" + ["module_syncthing,port"]="8884 22000 21027" + ["module_syncthing,arch"]="x86-64 arm64" ) # # Module syncthing @@ -28,11 +29,12 @@ function module_syncthing () { case "$1" in "${commands[0]}") - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install [[ -d "$SYNCTHING_BASE" ]] || mkdir -p "$SYNCTHING_BASE" || { echo "Couldn't create storage directory: $SYNCTHING_BASE"; exit 1; } docker run -d \ --name=syncthing \ --hostname=syncthing `#optional` \ + --net=lsio \ -e PUID=1000 \ -e PGID=1000 \ -e TZ="$(cat /etc/timezone)" \ @@ -62,6 +64,7 @@ function module_syncthing () { [[ "${image}" ]] && docker image rm "$image" >/dev/null ;; "${commands[2]}") + ${module_options["module_syncthing,feature"]} ${commands[1]} [[ -n "${SYNCTHING_BASE}" && "${SYNCTHING_BASE}" != "/" ]] && rm -rf "${SYNCTHING_BASE}" ;; "${commands[3]}") @@ -83,7 +86,7 @@ function module_syncthing () { echo ;; *) - ${module_options["module_syncthing,feature"]} ${commands[4]} + ${module_options["module_syncthing,feature"]} ${commands[4]} ;; esac } diff --git a/tools/modules/software/install_transmission.sh b/tools/modules/software/module_transmission.sh similarity index 71% rename from tools/modules/software/install_transmission.sh rename to tools/modules/software/module_transmission.sh index 3c9828454..abf736ef8 100644 --- a/tools/modules/software/install_transmission.sh +++ b/tools/modules/software/module_transmission.sh @@ -1,11 +1,14 @@ module_options+=( ["module_transmission,author"]="@armbian" + ["module_transmission,maintainer"]="@igorpecovnik" ["module_transmission,feature"]="module_transmission" + ["module_transmission,example"]="install remove purge status help" ["module_transmission,desc"]="Install transmission container" - ["module_transmission,example"]="install remove status help" - ["module_transmission,port"]="9091" ["module_transmission,status"]="Active" - ["module_transmission,arch"]="x86-64,arm64" + ["module_transmission,doc_link"]="https://transmissionbt.com/" + ["module_transmission,group"]="Downloaders" + ["module_transmission,port"]="9091 51413" + ["module_transmission,arch"]="x86-64 arm64" ) # # Module transmission @@ -26,19 +29,19 @@ function module_transmission () { case "$1" in "${commands[0]}") - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install [[ -d "$TRANSMISSION_BASE" ]] || mkdir -p "$TRANSMISSION_BASE" || { echo "Couldn't create storage directory: $TRANSMISSION_BASE"; exit 1; } + TRANSMISSION_USER=$($DIALOG --title "Enter username for Transmission server" --inputbox "\nHit enter for defaults" 9 50 "armbian" 3>&1 1>&2 2>&3) + TRANSMISSION_PASS=$($DIALOG --title "Enter password for Transmission server" --inputbox "\nHit enter for defaults" 9 50 "armbian" 3>&1 1>&2 2>&3) docker run -d \ --name=transmission \ + --net=lsio \ -e PUID=1000 \ -e PGID=1000 \ -e TZ="$(cat /etc/timezone)" \ - -e TRANSMISSION_WEB_HOME= `#optional` \ - -e USER= `#optional` \ - -e PASS= `#optional` \ - -e WHITELIST= `#optional` \ - -e PEERPORT= `#optional` \ - -e HOST_WHITELIST= `#optional` \ + -e USER="${TRANSMISSION_USER}" \ + -e PASS="${TRANSMISSION_PASS}" \ + -e WHITELIST="${LOCALWHITELIST}" \ -p 9091:9091 \ -p 51413:51413 \ -p 51413:51413/udp \ @@ -62,16 +65,19 @@ function module_transmission () { "${commands[1]}") [[ "${container}" ]] && docker container rm -f "$container" >/dev/null [[ "${image}" ]] && docker image rm "$image" >/dev/null - [[ -n "${TRANSMISSION_BASE}" && "${TRANSMISSION_BASE}" != "/" ]] && rm -rf "${TRANSMISSION_BASE}" ;; "${commands[2]}") + ${module_options["module_transmission,feature"]} ${commands[1]} + [[ -n "${TRANSMISSION_BASE}" && "${TRANSMISSION_BASE}" != "/" ]] && rm -rf "${TRANSMISSION_BASE}" + ;; + "${commands[3]}") if [[ "${container}" && "${image}" ]]; then return 0 else return 1 fi ;; - "${commands[3]}") + "${commands[4]}") echo -e "\nUsage: ${module_options["module_transmission,feature"]} " echo -e "Commands: ${module_options["module_transmission,example"]}" echo "Available commands:" @@ -81,7 +87,7 @@ function module_transmission () { echo ;; *) - ${module_options["module_transmission,feature"]} ${commands[3]} + ${module_options["module_transmission,feature"]} ${commands[4]} ;; esac } diff --git a/tools/modules/software/install_uptime-kuma.sh b/tools/modules/software/module_uptime-kuma.sh similarity index 83% rename from tools/modules/software/install_uptime-kuma.sh rename to tools/modules/software/module_uptime-kuma.sh index bb7972b5c..dac6d6b90 100644 --- a/tools/modules/software/install_uptime-kuma.sh +++ b/tools/modules/software/module_uptime-kuma.sh @@ -1,11 +1,14 @@ module_options+=( ["module_uptimekuma,author"]="@armbian" + ["module_uptimekuma,maintainer"]="@igorpecovnik" ["module_uptimekuma,feature"]="module_uptimekuma" - ["module_uptimekuma,desc"]="Install uptimekuma container" ["module_uptimekuma,example"]="install remove purge status help" - ["module_uptimekuma,port"]="3001" + ["module_uptimekuma,desc"]="Install uptimekuma container" ["module_uptimekuma,status"]="Active" - ["module_uptimekuma,arch"]="x86-64,arm64" + ["module_uptimekuma,doc_link"]="https://github.com/louislam/uptime-kuma/wiki" + ["module_uptimekuma,group"]="Downloaders" + ["module_uptimekuma,port"]="3001" + ["module_uptimekuma,arch"]="x86-64 arm64" ) # # Module uptimekuma @@ -26,9 +29,11 @@ function module_uptimekuma () { case "$1" in "${commands[0]}") - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install [[ -d "$UPTIMEKUMA_BASE" ]] || mkdir -p "$UPTIMEKUMA_BASE" || { echo "Couldn't create storage directory: $UPTIMEKUMA_BASE"; exit 1; } - docker run -d --name uptime-kuma \ + docker run -d \ + --net=lsio \ + --name uptime-kuma \ --restart=always \ -p 3001:3001 \ -v "${UPTIMEKUMA_BASE}:/app/data" \ @@ -50,6 +55,7 @@ function module_uptimekuma () { [[ "${image}" ]] && docker image rm "$image" >/dev/null ;; "${commands[2]}") + ${module_options["module_uptimekuma,feature"]} ${commands[1]} [[ -n "${UPTIMEKUMA_BASE}" && "${UPTIMEKUMA_BASE}" != "/" ]] && rm -rf "${UPTIMEKUMA_BASE}" ;; "${commands[3]}") @@ -70,7 +76,7 @@ function module_uptimekuma () { echo ;; *) - ${module_options["module_uptimekuma,feature"]} ${commands[4]} + ${module_options["module_uptimekuma,feature"]} ${commands[4]} ;; esac } diff --git a/tools/modules/software/install_watchtower.sh b/tools/modules/software/module_watchtower.sh similarity index 87% rename from tools/modules/software/install_watchtower.sh rename to tools/modules/software/module_watchtower.sh index 8931712ef..80d1d7eaf 100644 --- a/tools/modules/software/install_watchtower.sh +++ b/tools/modules/software/module_watchtower.sh @@ -1,11 +1,14 @@ module_options+=( ["module_watchtower,author"]="@armbian" + ["module_watchtower,maintainer"]="@igorpecovnik" ["module_watchtower,feature"]="module_watchtower" - ["module_watchtower,desc"]="Install watchtower container" ["module_watchtower,example"]="install remove status help" - ["module_watchtower,port"]="" + ["module_watchtower,desc"]="Install watchtower container" ["module_watchtower,status"]="Active" - ["module_watchtower,arch"]="" + ["module_watchtower,doc_link"]="https://containrrr.dev/watchtower/" + ["module_watchtower,group"]="Updates" + ["module_watchtower,port"]="" + ["module_watchtower,arch"]="x86-64 arm64" ) # # Module watchtower @@ -24,8 +27,9 @@ function module_watchtower () { case "$1" in "${commands[0]}") - pkg_installed docker-ce || install_docker + pkg_installed docker-ce || module_docker install docker run -d \ + --net=lsio \ --name watchtower \ -v /var/run/docker.sock:/var/run/docker.sock \ containrrr/watchtower diff --git a/tools/modules/software/install_webmin.sh b/tools/modules/software/module_webmin.sh similarity index 89% rename from tools/modules/software/install_webmin.sh rename to tools/modules/software/module_webmin.sh index 801c765ba..de3603c11 100644 --- a/tools/modules/software/install_webmin.sh +++ b/tools/modules/software/module_webmin.sh @@ -1,11 +1,14 @@ - - module_options+=( ["module_webmin,author"]="@Tearran" + ["module_webmin,maintainer"]="@Tearran" ["module_webmin,feature"]="module_webmin" ["module_webmin,example"]="help install remove start stop enable disable status check" ["module_webmin,desc"]="Webmin setup and service setting." - ["module_webmin,status"]="review" + ["module_webmin,status"]="Active" + ["module_webmin,doc_link"]="https://webmin.com/docs/" + ["module_webmin,group"]="Management" + ["module_webmin,port"]="10000" + ["module_webmin,arch"]="x86-64 arm64 armhf" ) function module_webmin() { @@ -41,10 +44,12 @@ function module_webmin() { ;; "${commands[1]}") ## install webmin - pkg_install --update wget apt-transport-https + pkg_update + pkg_install wget apt-transport-https echo "deb [signed-by=/usr/share/keyrings/webmin-archive-keyring.gpg] http://download.webmin.com/download/repository sarge contrib" | sudo tee /etc/apt/sources.list.d/webmin.list wget -qO- http://www.webmin.com/jcameron-key.asc | gpg --dearmor | tee /usr/share/keyrings/webmin-archive-keyring.gpg > /dev/null - pkg_install --update --install-recommends webmin + pkg_update + pkg_install webmin echo "Webmin installed successfully." ;; "${commands[2]}") @@ -105,6 +110,3 @@ function module_webmin() { ;; esac } - - -#module_webmin "$1"