From c12f2773e70248cc33ee205cf6ae025987230f05 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 15 May 2023 07:39:30 -0400 Subject: [PATCH] Code refactoring --- install/adguard-install.sh | 2 +- install/alpine-adguard-install.sh | 2 +- install/alpine-docker-install.sh | 2 +- install/alpine-grafana-install.sh | 2 +- install/alpine-vaultwarden-install.sh | 2 +- install/alpine-whoogle-install.sh | 2 +- install/alpine-zigbee2mqtt-install.sh | 2 +- install/audiobookshelf-install.sh | 2 +- install/autobrr-install.sh | 2 +- install/bazarr-install.sh | 3 +-- install/blocky-install.sh | 2 +- install/casaos-install.sh | 3 +-- install/changedetection-install.sh | 2 +- install/cloudflared-install.sh | 2 +- install/cronicle-install.sh | 2 +- install/daemonsync-install.sh | 2 +- install/dashy-install.sh | 2 +- install/debian-install.sh | 2 +- install/deconz-install.sh | 2 +- install/deluge-install.sh | 2 +- install/devuan-install.sh | 2 +- install/docker-install.sh | 2 +- install/emby-install.sh | 4 ++-- install/emqx-install.sh | 2 +- install/esphome-install.sh | 2 +- install/fhem-install.sh | 2 +- install/go2rtc-install.sh | 2 +- install/grafana-install.sh | 2 +- install/grocy-install.sh | 3 +-- install/heimdalldashboard-install.sh | 2 +- install/homeassistant-core-install.sh | 2 +- install/homeassistant-install.sh | 2 +- install/homebridge-install.sh | 2 +- install/homepage-install.sh | 2 +- install/homer-install.sh | 3 +-- install/hyperion-install.sh | 2 +- install/influxdb-install.sh | 2 +- install/iobroker-install.sh | 2 +- install/jackett-install.sh | 2 +- install/jellyfin-install.sh | 4 ++-- install/k0s-install.sh | 2 +- install/kavita-install.sh | 2 +- install/keycloak-install.sh | 2 +- install/lidarr-install.sh | 2 +- install/magicmirror-install.sh | 2 +- install/mariadb-install.sh | 2 +- install/meshcentral-install.sh | 2 +- install/motioneye-install.sh | 2 +- install/mqtt-install.sh | 2 +- install/n8n-install.sh | 2 +- install/navidrome-install.sh | 2 +- install/nextcloudpi-install.sh | 2 +- install/nginxproxymanager-install.sh | 2 +- install/nocodb-install.sh | 2 +- install/node-red-install.sh | 2 +- install/octoprint-install.sh | 2 +- install/omada-install.sh | 2 +- install/omv-install.sh | 2 +- install/openhab-install.sh | 2 +- install/paperless-ngx-install.sh | 4 ++-- install/photoprism-install.sh | 3 +-- install/pihole-install.sh | 2 +- install/plex-install.sh | 4 ++-- install/podman-homeassistant-install.sh | 2 +- install/podman-install.sh | 2 +- install/postgresql-install.sh | 2 +- install/prometheus-install.sh | 2 +- install/prowlarr-install.sh | 2 +- install/qbittorrent-install.sh | 2 +- install/radarr-install.sh | 2 +- install/readarr-install.sh | 2 +- install/rstptoweb-install.sh | 2 +- install/sabnzbd-install.sh | 3 +-- install/scrypted-install.sh | 2 +- install/shinobi-install.sh | 2 +- install/sonarr-install.sh | 2 +- install/syncthing-install.sh | 2 +- install/tautulli-install.sh | 2 +- install/tdarr-install.sh | 3 +-- install/technitiumdns-install.sh | 2 +- install/transmission-install.sh | 2 +- install/trilium-install.sh | 2 +- install/ubuntu-install.sh | 2 +- install/umbrel-install.sh | 2 +- install/unifi-install.sh | 2 +- install/uptimekuma-install.sh | 2 +- install/vaultwarden-install.sh | 2 +- install/whisparr-install.sh | 2 +- install/whoogle-install.sh | 2 +- install/wikijs-install.sh | 2 +- install/wireguard-install.sh | 2 +- install/yunohost-install.sh | 2 +- install/zigbee2mqtt-install.sh | 2 +- install/zwave-js-ui-install.sh | 3 +-- misc/alpine-install.func | 8 ++------ misc/build.func | 2 +- misc/install.func | 8 ++------ 97 files changed, 103 insertions(+), 119 deletions(-) diff --git a/install/adguard-install.sh b/install/adguard-install.sh index fb490e06..124f2e68 100644 --- a/install/adguard-install.sh +++ b/install/adguard-install.sh @@ -29,7 +29,7 @@ rm install.sh msg_ok "Installed AdGuard Home" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/alpine-adguard-install.sh b/install/alpine-adguard-install.sh index 33df28ab..b43c55ce 100644 --- a/install/alpine-adguard-install.sh +++ b/install/alpine-adguard-install.sh @@ -33,4 +33,4 @@ $STD /opt/AdGuardHome/AdGuardHome -s start msg_ok "Installed Alpine-AdGuard" motd_ssh -root +customize diff --git a/install/alpine-docker-install.sh b/install/alpine-docker-install.sh index 4ed450e5..368a4d3f 100644 --- a/install/alpine-docker-install.sh +++ b/install/alpine-docker-install.sh @@ -59,4 +59,4 @@ if echo "$prompt" | grep -Eq "^(y|yes)$"; then fi motd_ssh -root \ No newline at end of file +customize \ No newline at end of file diff --git a/install/alpine-grafana-install.sh b/install/alpine-grafana-install.sh index d20a7aca..09dc91ef 100644 --- a/install/alpine-grafana-install.sh +++ b/install/alpine-grafana-install.sh @@ -29,4 +29,4 @@ $STD rc-update add grafana default msg_ok "Installed Grafana" motd_ssh -root \ No newline at end of file +customize \ No newline at end of file diff --git a/install/alpine-vaultwarden-install.sh b/install/alpine-vaultwarden-install.sh index f048745b..9d8b628d 100644 --- a/install/alpine-vaultwarden-install.sh +++ b/install/alpine-vaultwarden-install.sh @@ -37,4 +37,4 @@ $STD rc-update add vaultwarden default msg_ok "Installed Alpine-Vaultwarden" motd_ssh -root \ No newline at end of file +customize \ No newline at end of file diff --git a/install/alpine-whoogle-install.sh b/install/alpine-whoogle-install.sh index b85e76d0..d6cfcc69 100644 --- a/install/alpine-whoogle-install.sh +++ b/install/alpine-whoogle-install.sh @@ -49,4 +49,4 @@ rc-update add -q whoogle default msg_ok "Installed Alpine-Whoogle" motd_ssh -root +customize diff --git a/install/alpine-zigbee2mqtt-install.sh b/install/alpine-zigbee2mqtt-install.sh index 4abf334e..322e6e5f 100644 --- a/install/alpine-zigbee2mqtt-install.sh +++ b/install/alpine-zigbee2mqtt-install.sh @@ -26,4 +26,4 @@ $STD apk add zigbee2mqtt msg_ok "Installed Alpine-Zigbee2MQTT" motd_ssh -root \ No newline at end of file +customize \ No newline at end of file diff --git a/install/audiobookshelf-install.sh b/install/audiobookshelf-install.sh index 5586918e..0de9f082 100644 --- a/install/audiobookshelf-install.sh +++ b/install/audiobookshelf-install.sh @@ -28,7 +28,7 @@ $STD apt install audiobookshelf msg_ok "Installed audiobookshelf" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/autobrr-install.sh b/install/autobrr-install.sh index dbf1cea3..5a50883d 100644 --- a/install/autobrr-install.sh +++ b/install/autobrr-install.sh @@ -49,7 +49,7 @@ systemctl enable --now -q autobrr.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/bazarr-install.sh b/install/bazarr-install.sh index bd395f66..9e847172 100755 --- a/install/bazarr-install.sh +++ b/install/bazarr-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y unzip $STD apt-get install -y python3-pip msg_ok "Installed Dependencies" @@ -53,7 +52,7 @@ systemctl enable -q --now bazarr msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" rm -rf bazarr.zip diff --git a/install/blocky-install.sh b/install/blocky-install.sh index 3f0409bf..6ef5abcc 100644 --- a/install/blocky-install.sh +++ b/install/blocky-install.sh @@ -282,7 +282,7 @@ $STD systemctl enable --now blocky msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/casaos-install.sh b/install/casaos-install.sh index cf4ee609..c0a068d0 100644 --- a/install/casaos-install.sh +++ b/install/casaos-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y unzip msg_ok "Installed Dependencies" msg_info "Installing CasaOS (Patience)" @@ -37,7 +36,7 @@ $STD bash <(curl -fsSL https://get.casaos.io) msg_ok "Installed CasaOS" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index 53c78041..34e0bcca 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -43,7 +43,7 @@ $STD systemctl enable --now changedetection msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/cloudflared-install.sh b/install/cloudflared-install.sh index d75c0191..921da7cd 100644 --- a/install/cloudflared-install.sh +++ b/install/cloudflared-install.sh @@ -28,7 +28,7 @@ $STD apt-get install -y cloudflared msg_ok "Installed Cloudflared" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/cronicle-install.sh b/install/cronicle-install.sh index 281a6f19..9f9073c3 100644 --- a/install/cronicle-install.sh +++ b/install/cronicle-install.sh @@ -48,7 +48,7 @@ $STD update-rc.d cronicled defaults msg_ok "Installed Cronicle Primary Server" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/daemonsync-install.sh b/install/daemonsync-install.sh index dead1801..8118f42b 100644 --- a/install/daemonsync-install.sh +++ b/install/daemonsync-install.sh @@ -26,7 +26,7 @@ $STD dpkg -i daemonsync_2.2.0.0059_amd64.deb msg_ok "Installed Daemon Sync Server" motd_ssh -root +customize msg_info "Cleaning up" rm -rf daemonsync_2.2.0.0059_amd64.deb diff --git a/install/dashy-install.sh b/install/dashy-install.sh index 089fcdde..6bb812f7 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -57,7 +57,7 @@ systemctl start dashy msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/debian-install.sh b/install/debian-install.sh index 0e4905fb..af84fbb8 100644 --- a/install/debian-install.sh +++ b/install/debian-install.sh @@ -20,7 +20,7 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/deconz-install.sh b/install/deconz-install.sh index 068cf5f3..eab4d521 100644 --- a/install/deconz-install.sh +++ b/install/deconz-install.sh @@ -50,7 +50,7 @@ $STD systemctl enable --now deconz msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/deluge-install.sh b/install/deluge-install.sh index 1a55fb27..b42e24f6 100644 --- a/install/deluge-install.sh +++ b/install/deluge-install.sh @@ -65,7 +65,7 @@ systemctl enable --now -q deluge-web.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/devuan-install.sh b/install/devuan-install.sh index eb2b237b..64e6f242 100644 --- a/install/devuan-install.sh +++ b/install/devuan-install.sh @@ -20,7 +20,7 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/docker-install.sh b/install/docker-install.sh index c2a33444..8240ed8f 100644 --- a/install/docker-install.sh +++ b/install/docker-install.sh @@ -69,7 +69,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then fi motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/emby-install.sh b/install/emby-install.sh index 668222f7..52fc3af6 100644 --- a/install/emby-install.sh +++ b/install/emby-install.sh @@ -19,7 +19,7 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" -if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then +if [[ "$CTTYPE" == "0" ]]; then msg_info "Setting Up Hardware Acceleration" $STD apt-get -y install \ va-driver-all \ @@ -43,7 +43,7 @@ $STD dpkg -i emby-server-deb_${LATEST}_amd64.deb msg_ok "Installed Emby" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/emqx-install.sh b/install/emqx-install.sh index 74b3c2d3..a1d69324 100644 --- a/install/emqx-install.sh +++ b/install/emqx-install.sh @@ -26,7 +26,7 @@ $STD systemctl enable --now emqx msg_ok "Installed EMQX" motd_ssh -root +customize msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/install/esphome-install.sh b/install/esphome-install.sh index fe8e8e46..ce0224f0 100644 --- a/install/esphome-install.sh +++ b/install/esphome-install.sh @@ -46,7 +46,7 @@ systemctl start esphomeDashboard msg_ok "Installed ESPHome Dashboard" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/fhem-install.sh b/install/fhem-install.sh index caf99993..e3ce0f67 100644 --- a/install/fhem-install.sh +++ b/install/fhem-install.sh @@ -32,7 +32,7 @@ $STD apt-get install -y fhem msg_info "Installed Fhem" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/go2rtc-install.sh b/install/go2rtc-install.sh index 75211aeb..a5092fd8 100644 --- a/install/go2rtc-install.sh +++ b/install/go2rtc-install.sh @@ -43,7 +43,7 @@ systemctl enable -q --now go2rtc msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/grafana-install.sh b/install/grafana-install.sh index 1ab76079..6f5a3efc 100644 --- a/install/grafana-install.sh +++ b/install/grafana-install.sh @@ -35,7 +35,7 @@ systemctl enable --now -q grafana-server.service msg_ok "Installed Grafana" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/grocy-install.sh b/install/grocy-install.sh index b51cfbcc..47da262c 100644 --- a/install/grocy-install.sh +++ b/install/grocy-install.sh @@ -18,7 +18,6 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y apache2 -$STD apt-get install -y unzip $STD apt-get install -y apt-transport-https $STD apt-get install -y lsb-release msg_ok "Installed Dependencies" @@ -63,7 +62,7 @@ systemctl reload apache2 msg_ok "Installed grocy" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/heimdalldashboard-install.sh b/install/heimdalldashboard-install.sh index df8e7cc2..78d3be90 100644 --- a/install/heimdalldashboard-install.sh +++ b/install/heimdalldashboard-install.sh @@ -58,7 +58,7 @@ $STD sudo systemctl enable --now heimdall.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index f7cc1c9c..663e5e99 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -100,7 +100,7 @@ $STD systemctl enable --now homeassistant msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/homeassistant-install.sh b/install/homeassistant-install.sh index ab92e64a..789ec5ea 100644 --- a/install/homeassistant-install.sh +++ b/install/homeassistant-install.sh @@ -84,7 +84,7 @@ $STD docker run -d \ msg_ok "Installed Home Assistant $CORE_LATEST_VERSION" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/homebridge-install.sh b/install/homebridge-install.sh index 463b7ab8..ed071136 100644 --- a/install/homebridge-install.sh +++ b/install/homebridge-install.sh @@ -32,7 +32,7 @@ $STD apt-get install -y homebridge msg_info "Installed Homebridge" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/homepage-install.sh b/install/homepage-install.sh index 7cabc3c3..3f5c85d9 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -58,7 +58,7 @@ $STD systemctl enable --now homepage msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/homer-install.sh b/install/homer-install.sh index 197af604..f4a8d3eb 100644 --- a/install/homer-install.sh +++ b/install/homer-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y unzip $STD apt-get install -y pip msg_ok "Installed Dependencies" @@ -46,7 +45,7 @@ $STD systemctl enable --now homer msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/hyperion-install.sh b/install/hyperion-install.sh index f8a3df3c..17971c57 100644 --- a/install/hyperion-install.sh +++ b/install/hyperion-install.sh @@ -31,7 +31,7 @@ $STD systemctl enable --now hyperion@root.service msg_ok "Installed Hyperion" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove >/dev/null diff --git a/install/influxdb-install.sh b/install/influxdb-install.sh index 8167b01f..b1683824 100644 --- a/install/influxdb-install.sh +++ b/install/influxdb-install.sh @@ -55,7 +55,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then fi motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/iobroker-install.sh b/install/iobroker-install.sh index 5146abea..ae553a46 100644 --- a/install/iobroker-install.sh +++ b/install/iobroker-install.sh @@ -24,7 +24,7 @@ $STD bash <(curl -fsSL https://iobroker.net/install.sh) msg_ok "Installed ioBroker" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/jackett-install.sh b/install/jackett-install.sh index b4982d3c..e54858d5 100644 --- a/install/jackett-install.sh +++ b/install/jackett-install.sh @@ -46,7 +46,7 @@ systemctl enable -q --now jackett.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/jellyfin-install.sh b/install/jellyfin-install.sh index 98d427b0..1477ef87 100644 --- a/install/jellyfin-install.sh +++ b/install/jellyfin-install.sh @@ -20,7 +20,7 @@ $STD apt-get install -y gnupg $STD apt-get install -y mc msg_ok "Installed Dependencies" -if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then +if [[ "$CTTYPE" == "0" ]]; then msg_info "Setting Up Hardware Acceleration" $STD apt-get -y install \ va-driver-all \ @@ -59,7 +59,7 @@ $STD apt-get install -y jellyfin msg_ok "Installed Jellyfin" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/k0s-install.sh b/install/k0s-install.sh index 7e772932..323bbebe 100644 --- a/install/k0s-install.sh +++ b/install/k0s-install.sh @@ -35,7 +35,7 @@ $STD bash <(curl -sSLf https://raw.githubusercontent.com/helm/helm/main/scripts/ msg_ok "Installed Helm" fi motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/kavita-install.sh b/install/kavita-install.sh index eaf48992..b3fe9267 100644 --- a/install/kavita-install.sh +++ b/install/kavita-install.sh @@ -46,7 +46,7 @@ systemctl enable --now -q kavita.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/keycloak-install.sh b/install/keycloak-install.sh index 0dcf8c8f..ba9d4198 100644 --- a/install/keycloak-install.sh +++ b/install/keycloak-install.sh @@ -43,7 +43,7 @@ $STD systemctl enable --now keycloak.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/lidarr-install.sh b/install/lidarr-install.sh index a7ec14d2..e03c7680 100644 --- a/install/lidarr-install.sh +++ b/install/lidarr-install.sh @@ -51,7 +51,7 @@ systemctl enable --now -q lidarr msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" rm -rf Lidarr.master.*.tar.gz diff --git a/install/magicmirror-install.sh b/install/magicmirror-install.sh index 249f46a6..f262b885 100644 --- a/install/magicmirror-install.sh +++ b/install/magicmirror-install.sh @@ -148,7 +148,7 @@ $STD systemctl enable --now magicmirror msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/mariadb-install.sh b/install/mariadb-install.sh index a3326a35..3fefa9b1 100644 --- a/install/mariadb-install.sh +++ b/install/mariadb-install.sh @@ -35,7 +35,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then fi motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/meshcentral-install.sh b/install/meshcentral-install.sh index 3defc5eb..bd76b239 100644 --- a/install/meshcentral-install.sh +++ b/install/meshcentral-install.sh @@ -35,7 +35,7 @@ $STD node node_modules/meshcentral --install msg_ok "Installed MeshCentral" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/motioneye-install.sh b/install/motioneye-install.sh index cbb1a732..5ebe8fc7 100644 --- a/install/motioneye-install.sh +++ b/install/motioneye-install.sh @@ -51,7 +51,7 @@ systemctl enable -q --now motioneye msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/mqtt-install.sh b/install/mqtt-install.sh index 135abf56..71e0ef9a 100644 --- a/install/mqtt-install.sh +++ b/install/mqtt-install.sh @@ -31,7 +31,7 @@ $STD apt-get -y install mosquitto-clients msg_ok "Installed Mosquitto MQTT Broker" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/n8n-install.sh b/install/n8n-install.sh index 7e735a09..0c2c1cd2 100644 --- a/install/n8n-install.sh +++ b/install/n8n-install.sh @@ -46,7 +46,7 @@ $STD systemctl enable --now n8n msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/navidrome-install.sh b/install/navidrome-install.sh index 67f255a2..d1a890db 100644 --- a/install/navidrome-install.sh +++ b/install/navidrome-install.sh @@ -75,7 +75,7 @@ $STD systemctl enable --now navidrome.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/nextcloudpi-install.sh b/install/nextcloudpi-install.sh index a2ac437c..912e5ad6 100644 --- a/install/nextcloudpi-install.sh +++ b/install/nextcloudpi-install.sh @@ -28,7 +28,7 @@ service apache2 restart msg_ok "Installed NextCloudPi" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 8d797267..1300266d 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -182,7 +182,7 @@ EOF msg_ok "Created Service" motd_ssh -root +customize msg_info "Starting Services" sed -i 's/user npm/user root/g; s/^pid/#pid/g' /usr/local/openresty/nginx/conf/nginx.conf diff --git a/install/nocodb-install.sh b/install/nocodb-install.sh index 63bf1ca6..8435fc06 100644 --- a/install/nocodb-install.sh +++ b/install/nocodb-install.sh @@ -53,7 +53,7 @@ systemctl enable --now nocodb.service &>/dev/null msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/node-red-install.sh b/install/node-red-install.sh index fd2760f4..8e4d803b 100644 --- a/install/node-red-install.sh +++ b/install/node-red-install.sh @@ -56,7 +56,7 @@ $STD systemctl enable --now nodered.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/octoprint-install.sh b/install/octoprint-install.sh index b871219a..132eedd1 100644 --- a/install/octoprint-install.sh +++ b/install/octoprint-install.sh @@ -69,7 +69,7 @@ systemctl enable -q --now octoprint.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/omada-install.sh b/install/omada-install.sh index 6a359884..adcfe5aa 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -30,7 +30,7 @@ $STD dpkg -i Omada_SDN_Controller_v5.9.31_Linux_x64.deb msg_ok "Installed Omada Controller" motd_ssh -root +customize msg_info "Cleaning up" rm -f Omada_SDN_Controller_v5.9.31_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb diff --git a/install/omv-install.sh b/install/omv-install.sh index be058e99..90911799 100644 --- a/install/omv-install.sh +++ b/install/omv-install.sh @@ -42,7 +42,7 @@ omv-confdbadm populate msg_ok "Installed OpenMediaVault" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/openhab-install.sh b/install/openhab-install.sh index 43d5454b..f87848f3 100644 --- a/install/openhab-install.sh +++ b/install/openhab-install.sh @@ -41,7 +41,7 @@ $STD systemctl enable --now openhab.service msg_ok "Installed openHAB" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 55820dbb..ca2679af 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -27,7 +27,7 @@ $STD apt-get install -y --no-install-recommends \ redis \ postgresql \ build-essential \ - imagemagick \ + imagemagick \ fonts-liberation \ optipng \ gnupg \ @@ -192,7 +192,7 @@ $STD systemctl enable --now paperless-consumer paperless-webserver paperless-sch msg_ok "Created Services" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/photoprism-install.sh b/install/photoprism-install.sh index 92c00afb..df63bd6e 100644 --- a/install/photoprism-install.sh +++ b/install/photoprism-install.sh @@ -23,7 +23,6 @@ $STD apt-get install -y git $STD apt-get install -y gnupg $STD apt-get install -y make $STD apt-get install -y zip -$STD apt-get install -y unzip $STD apt-get install -y exiftool $STD apt-get install -y ffmpeg msg_ok "Installed Dependencies" @@ -119,7 +118,7 @@ WantedBy=multi-user.target" >$service_path msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/pihole-install.sh b/install/pihole-install.sh index 8cf049f7..9006ae2f 100644 --- a/install/pihole-install.sh +++ b/install/pihole-install.sh @@ -46,7 +46,7 @@ $STD bash <(curl -fsSL https://install.pi-hole.net) /dev/stdin --unattended msg_ok "Installed Pi-hole" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/plex-install.sh b/install/plex-install.sh index 127d4a11..5e7fda8d 100644 --- a/install/plex-install.sh +++ b/install/plex-install.sh @@ -19,7 +19,7 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" -if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then +if [[ "$CTTYPE" == "0" ]]; then msg_info "Setting Up Hardware Acceleration" $STD apt-get -y install \ va-driver-all \ @@ -46,7 +46,7 @@ $STD apt-get -o Dpkg::Options::="--force-confold" install -y plexmediaserver msg_ok "Installed Plex Media Server" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/podman-homeassistant-install.sh b/install/podman-homeassistant-install.sh index 70351f5e..a0fb4f5e 100644 --- a/install/podman-homeassistant-install.sh +++ b/install/podman-homeassistant-install.sh @@ -46,7 +46,7 @@ $STD systemctl enable --now homeassistant msg_ok "Installed Home Assistant" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/podman-install.sh b/install/podman-install.sh index 8c248463..951da53b 100644 --- a/install/podman-install.sh +++ b/install/podman-install.sh @@ -26,7 +26,7 @@ echo -e 'unqualified-search-registries=["docker.io"]' >> /etc/containers/registr msg_ok "Installed Podman" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/postgresql-install.sh b/install/postgresql-install.sh index 53fb2a25..5f455031 100644 --- a/install/postgresql-install.sh +++ b/install/postgresql-install.sh @@ -142,7 +142,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then fi motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/prometheus-install.sh b/install/prometheus-install.sh index 118241fd..f2aad6fd 100644 --- a/install/prometheus-install.sh +++ b/install/prometheus-install.sh @@ -55,7 +55,7 @@ $STD sudo systemctl enable --now prometheus msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/prowlarr-install.sh b/install/prowlarr-install.sh index 638d93c1..b999d9b5 100644 --- a/install/prowlarr-install.sh +++ b/install/prowlarr-install.sh @@ -49,7 +49,7 @@ systemctl enable --now -q prowlarr msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" rm -rf Prowlarr.master.*.tar.gz diff --git a/install/qbittorrent-install.sh b/install/qbittorrent-install.sh index 6995f6bb..1a6147d2 100644 --- a/install/qbittorrent-install.sh +++ b/install/qbittorrent-install.sh @@ -38,7 +38,7 @@ systemctl enable -q --now qbittorrent-nox msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/radarr-install.sh b/install/radarr-install.sh index 4c736895..f9e88aa5 100644 --- a/install/radarr-install.sh +++ b/install/radarr-install.sh @@ -49,7 +49,7 @@ systemctl enable --now -q radarr msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" rm -rf Radarr.master.*.tar.gz diff --git a/install/readarr-install.sh b/install/readarr-install.sh index 9452caa3..43897970 100644 --- a/install/readarr-install.sh +++ b/install/readarr-install.sh @@ -49,7 +49,7 @@ systemctl enable --now -q readarr msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" rm -rf Readarr.develop.*.tar.gz diff --git a/install/rstptoweb-install.sh b/install/rstptoweb-install.sh index 76c3792d..d345a102 100644 --- a/install/rstptoweb-install.sh +++ b/install/rstptoweb-install.sh @@ -53,7 +53,7 @@ systemctl enable -q --now rtsptoweb msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/sabnzbd-install.sh b/install/sabnzbd-install.sh index b779e31d..6c53de93 100644 --- a/install/sabnzbd-install.sh +++ b/install/sabnzbd-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y unzip $STD apt-get install -y par2 $STD apt-get install -y p7zip-full wget -q http://http.us.debian.org/debian/pool/non-free/u/unrar-nonfree/unrar_6.0.3-1+deb11u1_amd64.deb @@ -54,7 +53,7 @@ systemctl enable --now -q sabnzbd.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index dd766825..b1df07e1 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -110,7 +110,7 @@ $STD systemctl enable --now scrypted.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/shinobi-install.sh b/install/shinobi-install.sh index d6682ba3..3d8801dd 100644 --- a/install/shinobi-install.sh +++ b/install/shinobi-install.sh @@ -82,7 +82,7 @@ $STD pm2 list msg_ok "Installed Shinobi" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/sonarr-install.sh b/install/sonarr-install.sh index db1a7bf4..099257b0 100644 --- a/install/sonarr-install.sh +++ b/install/sonarr-install.sh @@ -29,7 +29,7 @@ DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" inst msg_ok "Installed Sonarr" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/syncthing-install.sh b/install/syncthing-install.sh index 14cd1b99..3e8eef08 100644 --- a/install/syncthing-install.sh +++ b/install/syncthing-install.sh @@ -33,7 +33,7 @@ systemctl restart syncthing@root.service msg_ok "Installed Syncthing" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/tautulli-install.sh b/install/tautulli-install.sh index 43a6a316..80ee51f7 100644 --- a/install/tautulli-install.sh +++ b/install/tautulli-install.sh @@ -50,7 +50,7 @@ systemctl enable -q --now tautulli msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/tdarr-install.sh b/install/tdarr-install.sh index 02a7baa8..5e097586 100644 --- a/install/tdarr-install.sh +++ b/install/tdarr-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y unzip msg_ok "Installed Dependencies" if [[ "$CTTYPE" == "0" ]]; then @@ -90,7 +89,7 @@ systemctl enable --now -q tdarr-node.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" rm -rf Tdarr_Updater.zip diff --git a/install/technitiumdns-install.sh b/install/technitiumdns-install.sh index a795fa37..4f3f6c98 100644 --- a/install/technitiumdns-install.sh +++ b/install/technitiumdns-install.sh @@ -35,7 +35,7 @@ $STD bash <(curl -fsSL https://download.technitium.com/dns/install.sh) msg_ok "Installed Technitium DNS" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/transmission-install.sh b/install/transmission-install.sh index 1c7c6f0c..969e6aea 100644 --- a/install/transmission-install.sh +++ b/install/transmission-install.sh @@ -28,7 +28,7 @@ systemctl start transmission-daemon msg_ok "Installed Transmission" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/trilium-install.sh b/install/trilium-install.sh index 02ab6d0f..da811245 100644 --- a/install/trilium-install.sh +++ b/install/trilium-install.sh @@ -50,7 +50,7 @@ systemctl enable --now -q trilium msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/ubuntu-install.sh b/install/ubuntu-install.sh index eb2b237b..64e6f242 100644 --- a/install/ubuntu-install.sh +++ b/install/ubuntu-install.sh @@ -20,7 +20,7 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/umbrel-install.sh b/install/umbrel-install.sh index 4ec349db..ea4d17ba 100644 --- a/install/umbrel-install.sh +++ b/install/umbrel-install.sh @@ -38,7 +38,7 @@ $STD systemctl enable --now umbrel-startup.service msg_ok "Installed Umbrel" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/unifi-install.sh b/install/unifi-install.sh index 9f297731..11515d90 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -38,7 +38,7 @@ $STD apt-get install -y unifi msg_ok "Installed UniFi Network Application" motd_ssh -root +customize msg_info "Cleaning up" rm -rf mongodb-org-server_3.6.23_amd64.deb diff --git a/install/uptimekuma-install.sh b/install/uptimekuma-install.sh index d5af2231..c78a890e 100644 --- a/install/uptimekuma-install.sh +++ b/install/uptimekuma-install.sh @@ -53,7 +53,7 @@ $STD systemctl enable --now uptime-kuma.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/vaultwarden-install.sh b/install/vaultwarden-install.sh index fe0edc19..65061b80 100644 --- a/install/vaultwarden-install.sh +++ b/install/vaultwarden-install.sh @@ -111,7 +111,7 @@ $STD systemctl enable --now vaultwarden.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/whisparr-install.sh b/install/whisparr-install.sh index 64b757f5..422ae576 100644 --- a/install/whisparr-install.sh +++ b/install/whisparr-install.sh @@ -49,7 +49,7 @@ systemctl enable --now -q whisparr msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" rm -rf Whisparr.develop.*.tar.gz diff --git a/install/whoogle-install.sh b/install/whoogle-install.sh index 943c59ad..1eb492f2 100644 --- a/install/whoogle-install.sh +++ b/install/whoogle-install.sh @@ -42,7 +42,7 @@ $STD systemctl enable --now whoogle.service msg_ok "Installed Whoogle" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/wikijs-install.sh b/install/wikijs-install.sh index 4bea8690..32152da6 100644 --- a/install/wikijs-install.sh +++ b/install/wikijs-install.sh @@ -70,7 +70,7 @@ $STD systemctl enable --now wikijs msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index f63333c9..a133b2df 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -41,7 +41,7 @@ $STD bash <(curl -fsSL https://install.pivpn.io) --unattended options.conf msg_ok "Installed WireGuard" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/yunohost-install.sh b/install/yunohost-install.sh index 48e7bbd6..aaeadc1b 100644 --- a/install/yunohost-install.sh +++ b/install/yunohost-install.sh @@ -30,7 +30,7 @@ $STD bash <(curl -fsSL https://install.yunohost.org) -a msg_ok "Installed YunoHost" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/zigbee2mqtt-install.sh b/install/zigbee2mqtt-install.sh index ca4e2905..eb10fdd6 100644 --- a/install/zigbee2mqtt-install.sh +++ b/install/zigbee2mqtt-install.sh @@ -69,7 +69,7 @@ $STD systemctl enable zigbee2mqtt.service msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" $STD apt-get autoremove diff --git a/install/zwave-js-ui-install.sh b/install/zwave-js-ui-install.sh index 67862f1f..a9a05c3e 100644 --- a/install/zwave-js-ui-install.sh +++ b/install/zwave-js-ui-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y unzip msg_ok "Installed Dependencies" msg_info "Installing Z-Wave JS UI" @@ -45,7 +44,7 @@ $STD systemctl enable zwave-js-ui msg_ok "Created Service" motd_ssh -root +customize msg_info "Cleaning up" rm zwave-js-ui-${RELEASE}-linux.zip diff --git a/misc/alpine-install.func b/misc/alpine-install.func index a7d282d9..ce38abed 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -117,13 +117,9 @@ motd_ssh() { } customize() { + if [[ "$PASSWORD" == "" ]]; then msg_info "Customizing Container" bash -c "passwd -d root" >/dev/null 2>&1 msg_ok "Customized Container" -} - -root() { - if ! getent shadow root | grep -q '^root:[^:]*:\?\$'; then - customize fi -} +} \ No newline at end of file diff --git a/misc/build.func b/misc/build.func index 39438910..2b426d1f 100644 --- a/misc/build.func +++ b/misc/build.func @@ -169,7 +169,7 @@ advanced_settings() { if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then if [ -z $PW1 ]; then PW1="Automatic Login" - PW=" " + PW="" else PW="-password $PW1" fi diff --git a/misc/install.func b/misc/install.func index d4bf0af0..df2c9cd6 100644 --- a/misc/install.func +++ b/misc/install.func @@ -116,6 +116,7 @@ motd_ssh() { } customize() { + if [[ "$PASSWORD" == "" ]]; then msg_info "Customizing Container" GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" mkdir -p $(dirname $GETTY_OVERRIDE) @@ -127,10 +128,5 @@ EOF systemctl daemon-reload systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" -} - -root() { - if ! getent shadow root | grep -q "^root:[^\!*]"; then - customize fi -} +} \ No newline at end of file