From df2a0f91440674b8470b99e9c652fb322529acbb Mon Sep 17 00:00:00 2001 From: John Dorman <427295+boostchicken@users.noreply.github.com> Date: Wed, 22 Feb 2023 21:44:27 -0800 Subject: [PATCH] moved to bash (#499) thanks @kb9gxk --- cloudflare-ddns/on_boot.d/30-cloudflare-ddns.sh | 2 +- cni-plugins/05-install-cni-plugins.sh | 2 +- container-common/on_boot.d/05-container-common.sh | 2 +- dns-common/on_boot.d/10-dns.sh | 2 +- haproxy/50-haproxy.sh | 2 +- hdhomerun/on_boot.d/99-hdhomerun.sh | 2 +- homebridge/on_boot.d/25-homebridge.sh | 2 +- ipt-enable-logs/on_boot.d/30-ipt-enable-logs-launch.sh | 2 +- ipt-enable-logs/scripts/ipt-enable-logs.sh | 2 +- ipt-enable-logs/scripts/refresh-iptables.sh | 2 +- mosquitto/on_boot.d/45-mosquitto.sh | 2 +- on-boot-script-2.x/README.md | 2 +- on-boot-script-2.x/build_deb.sh | 2 +- .../examples/udm-files/on_boot.d/10-shell-profile.sh | 2 +- .../examples/udm-files/on_boot.d/10-wpa_supplicant.sh | 2 +- .../examples/udm-files/on_boot.d/15-add-.profile.sh | 2 +- .../examples/udm-files/on_boot.d/15-add-github-ssh-keys.sh | 2 +- .../examples/udm-files/on_boot.d/15-add-root-ssh-keys.sh | 2 +- .../examples/udm-files/on_boot.d/15-add-ssh-known-hosts.sh | 2 +- .../examples/udm-files/on_boot.d/15-preserve-history.sh | 2 +- .../examples/udm-files/on_boot.d/20-ntopng-udm.sh | 2 +- .../examples/udm-files/on_boot.d/25-add-cron-jobs.sh | 2 +- .../examples/udm-files/on_boot.d/50-start-node-exporter.sh | 2 +- .../examples/udm-files/on_boot.d/files/.profile | 2 +- .../examples/udm-files/on_boot.d/iptables_timerestrict.sh | 2 +- .../examples/udm-networking/on_boot.d/06-cni-bridge.sh | 2 +- on-boot-script-2.x/manual-install/install.sh | 2 +- on-boot-script/README.md | 2 +- on-boot-script/README.old.md | 4 ++-- on-boot-script/build_deb.sh | 2 +- .../examples/udm-files/on_boot.d/10-shell-profile.sh | 2 +- .../examples/udm-files/on_boot.d/10-wpa_supplicant.sh | 2 +- .../examples/udm-files/on_boot.d/15-add-.profile.sh | 2 +- .../examples/udm-files/on_boot.d/15-add-github-ssh-keys.sh | 2 +- .../examples/udm-files/on_boot.d/15-add-root-ssh-keys.sh | 2 +- .../examples/udm-files/on_boot.d/15-add-ssh-known-hosts.sh | 2 +- .../examples/udm-files/on_boot.d/15-preserve-history.sh | 2 +- on-boot-script/examples/udm-files/on_boot.d/20-ntopng-udm.sh | 2 +- .../examples/udm-files/on_boot.d/25-add-cron-jobs.sh | 2 +- .../examples/udm-files/on_boot.d/50-start-node-exporter.sh | 2 +- on-boot-script/examples/udm-files/on_boot.d/files/.profile | 2 +- .../examples/udm-files/on_boot.d/iptables_timerestrict.sh | 2 +- .../examples/udm-networking/on_boot.d/06-cni-bridge.sh | 2 +- on-boot-script/manual-install/install.sh | 2 +- persist-changes/README.md | 2 +- persist-changes/on_boot.d/42-watch-for-changes.sh | 2 +- persist-changes/scripts/on-state-change.sh | 2 +- podman-install/on_boot.d/00-podman.sh | 2 +- podman-update/01-podman-update.sh | 2 +- python/install_pip.sh | 2 +- python/on_boot.d/20-python.sh | 2 +- rclone/10-rclone.sh | 2 +- rclone/rclone | 2 +- run-pihole/custom_pihole_dote.sh | 4 ++-- suricata/on_boot.d/25-suricata.sh | 4 ++-- tailscale/on_boot.d/20-tailscale.sh | 2 +- unbound/on_boot.d/11-unbound-macvlanip.sh | 2 +- unbound/scripts/init_unbound.sh | 2 +- unbound/scripts/upd_unbound.sh | 2 +- wireguard-go/on_boot.d/20-wireguard.sh | 2 +- zerotier-one/20-zerotier.sh | 2 +- 61 files changed, 64 insertions(+), 64 deletions(-) diff --git a/cloudflare-ddns/on_boot.d/30-cloudflare-ddns.sh b/cloudflare-ddns/on_boot.d/30-cloudflare-ddns.sh index a59adc5..cbb92ef 100644 --- a/cloudflare-ddns/on_boot.d/30-cloudflare-ddns.sh +++ b/cloudflare-ddns/on_boot.d/30-cloudflare-ddns.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash CONTAINER=cloudflare-ddns # Get DataDir location DATA_DIR="/data" diff --git a/cni-plugins/05-install-cni-plugins.sh b/cni-plugins/05-install-cni-plugins.sh index cec79ee..c968b54 100644 --- a/cni-plugins/05-install-cni-plugins.sh +++ b/cni-plugins/05-install-cni-plugins.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" diff --git a/container-common/on_boot.d/05-container-common.sh b/container-common/on_boot.d/05-container-common.sh index 3587484..17f10a6 100644 --- a/container-common/on_boot.d/05-container-common.sh +++ b/container-common/on_boot.d/05-container-common.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # This script runs before any custom containers start to adjust container common defaults # Set a limit for container logs. 104857600 Bytes = 100 Megabytes diff --git a/dns-common/on_boot.d/10-dns.sh b/dns-common/on_boot.d/10-dns.sh index 87b7fde..710e801 100644 --- a/dns-common/on_boot.d/10-dns.sh +++ b/dns-common/on_boot.d/10-dns.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/haproxy/50-haproxy.sh b/haproxy/50-haproxy.sh index 85c1dce..506f013 100644 --- a/haproxy/50-haproxy.sh +++ b/haproxy/50-haproxy.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash CONTAINER=haproxy # Get DataDir location DATA_DIR="/data" diff --git a/hdhomerun/on_boot.d/99-hdhomerun.sh b/hdhomerun/on_boot.d/99-hdhomerun.sh index ca93d1f..69e9657 100644 --- a/hdhomerun/on_boot.d/99-hdhomerun.sh +++ b/hdhomerun/on_boot.d/99-hdhomerun.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Place cross compiled version of `socat` in /data/hdhomerun HDHOMERUN_IP=10.10.30.146 diff --git a/homebridge/on_boot.d/25-homebridge.sh b/homebridge/on_boot.d/25-homebridge.sh index 950f10d..e7a27fa 100755 --- a/homebridge/on_boot.d/25-homebridge.sh +++ b/homebridge/on_boot.d/25-homebridge.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash CONTAINER=homebridge # Get DataDir location diff --git a/ipt-enable-logs/on_boot.d/30-ipt-enable-logs-launch.sh b/ipt-enable-logs/on_boot.d/30-ipt-enable-logs-launch.sh index 284d330..bb62650 100755 --- a/ipt-enable-logs/on_boot.d/30-ipt-enable-logs-launch.sh +++ b/ipt-enable-logs/on_boot.d/30-ipt-enable-logs-launch.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" diff --git a/ipt-enable-logs/scripts/ipt-enable-logs.sh b/ipt-enable-logs/scripts/ipt-enable-logs.sh index 7d248ea..7b8d40e 100755 --- a/ipt-enable-logs/scripts/ipt-enable-logs.sh +++ b/ipt-enable-logs/scripts/ipt-enable-logs.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/ipt-enable-logs/scripts/refresh-iptables.sh b/ipt-enable-logs/scripts/refresh-iptables.sh index d3195a0..5900cd1 100755 --- a/ipt-enable-logs/scripts/refresh-iptables.sh +++ b/ipt-enable-logs/scripts/refresh-iptables.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/mosquitto/on_boot.d/45-mosquitto.sh b/mosquitto/on_boot.d/45-mosquitto.sh index fc70c11..110f796 100755 --- a/mosquitto/on_boot.d/45-mosquitto.sh +++ b/mosquitto/on_boot.d/45-mosquitto.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/on-boot-script-2.x/README.md b/on-boot-script-2.x/README.md index 5bdf458..fa717e3 100644 --- a/on-boot-script-2.x/README.md +++ b/on-boot-script-2.x/README.md @@ -46,7 +46,7 @@ This will also install CNI Plugins & CNI Bridge scripts. If you are using UDMSE/ exit ``` -3. Copy any shell scripts you want to run to /data/on_boot.d on your UDM (not the unifi-os shell) and make sure they are executable and have the correct shebang (#!/bin/sh). Additionally, scripts need to have a `.sh` extention in their filename. +3. Copy any shell scripts you want to run to /data/on_boot.d on your UDM (not the unifi-os shell) and make sure they are executable and have the correct shebang (#!/bin/bash). Additionally, scripts need to have a `.sh` extention in their filename. Examples: diff --git a/on-boot-script-2.x/build_deb.sh b/on-boot-script-2.x/build_deb.sh index 00ea955..3abedb1 100755 --- a/on-boot-script-2.x/build_deb.sh +++ b/on-boot-script-2.x/build_deb.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e diff --git a/on-boot-script-2.x/examples/udm-files/on_boot.d/10-shell-profile.sh b/on-boot-script-2.x/examples/udm-files/on_boot.d/10-shell-profile.sh index 4998125..5b6642d 100644 --- a/on-boot-script-2.x/examples/udm-files/on_boot.d/10-shell-profile.sh +++ b/on-boot-script-2.x/examples/udm-files/on_boot.d/10-shell-profile.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/on-boot-script-2.x/examples/udm-files/on_boot.d/10-wpa_supplicant.sh b/on-boot-script-2.x/examples/udm-files/on_boot.d/10-wpa_supplicant.sh index 29a75ca..6d94fe4 100644 --- a/on-boot-script-2.x/examples/udm-files/on_boot.d/10-wpa_supplicant.sh +++ b/on-boot-script-2.x/examples/udm-files/on_boot.d/10-wpa_supplicant.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash ## create files like this with different numbers for execution order ## ala /etc/profile.d diff --git a/on-boot-script-2.x/examples/udm-files/on_boot.d/15-add-.profile.sh b/on-boot-script-2.x/examples/udm-files/on_boot.d/15-add-.profile.sh index 9ac4857..98e964c 100755 --- a/on-boot-script-2.x/examples/udm-files/on_boot.d/15-add-.profile.sh +++ b/on-boot-script-2.x/examples/udm-files/on_boot.d/15-add-.profile.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/on-boot-script-2.x/examples/udm-files/on_boot.d/15-add-github-ssh-keys.sh b/on-boot-script-2.x/examples/udm-files/on_boot.d/15-add-github-ssh-keys.sh index 8a469fd..dfa4168 100644 --- a/on-boot-script-2.x/examples/udm-files/on_boot.d/15-add-github-ssh-keys.sh +++ b/on-boot-script-2.x/examples/udm-files/on_boot.d/15-add-github-ssh-keys.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" diff --git a/on-boot-script-2.x/examples/udm-files/on_boot.d/15-add-root-ssh-keys.sh b/on-boot-script-2.x/examples/udm-files/on_boot.d/15-add-root-ssh-keys.sh index 70e7646..990f9e1 100644 --- a/on-boot-script-2.x/examples/udm-files/on_boot.d/15-add-root-ssh-keys.sh +++ b/on-boot-script-2.x/examples/udm-files/on_boot.d/15-add-root-ssh-keys.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/on-boot-script-2.x/examples/udm-files/on_boot.d/15-add-ssh-known-hosts.sh b/on-boot-script-2.x/examples/udm-files/on_boot.d/15-add-ssh-known-hosts.sh index 0a4c2bc..6d4910d 100644 --- a/on-boot-script-2.x/examples/udm-files/on_boot.d/15-add-ssh-known-hosts.sh +++ b/on-boot-script-2.x/examples/udm-files/on_boot.d/15-add-ssh-known-hosts.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/on-boot-script-2.x/examples/udm-files/on_boot.d/15-preserve-history.sh b/on-boot-script-2.x/examples/udm-files/on_boot.d/15-preserve-history.sh index 2a7f82b..78cbe79 100755 --- a/on-boot-script-2.x/examples/udm-files/on_boot.d/15-preserve-history.sh +++ b/on-boot-script-2.x/examples/udm-files/on_boot.d/15-preserve-history.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/on-boot-script-2.x/examples/udm-files/on_boot.d/20-ntopng-udm.sh b/on-boot-script-2.x/examples/udm-files/on_boot.d/20-ntopng-udm.sh index 21152ad..fc2e9e4 100644 --- a/on-boot-script-2.x/examples/udm-files/on_boot.d/20-ntopng-udm.sh +++ b/on-boot-script-2.x/examples/udm-files/on_boot.d/20-ntopng-udm.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash ## create files like this with different numbers for execution order ## ala /etc/profile.d diff --git a/on-boot-script-2.x/examples/udm-files/on_boot.d/25-add-cron-jobs.sh b/on-boot-script-2.x/examples/udm-files/on_boot.d/25-add-cron-jobs.sh index 6326a2d..7995730 100644 --- a/on-boot-script-2.x/examples/udm-files/on_boot.d/25-add-cron-jobs.sh +++ b/on-boot-script-2.x/examples/udm-files/on_boot.d/25-add-cron-jobs.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/on-boot-script-2.x/examples/udm-files/on_boot.d/50-start-node-exporter.sh b/on-boot-script-2.x/examples/udm-files/on_boot.d/50-start-node-exporter.sh index cb265e5..d36928f 100755 --- a/on-boot-script-2.x/examples/udm-files/on_boot.d/50-start-node-exporter.sh +++ b/on-boot-script-2.x/examples/udm-files/on_boot.d/50-start-node-exporter.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash CONTAINER=node-exporter diff --git a/on-boot-script-2.x/examples/udm-files/on_boot.d/files/.profile b/on-boot-script-2.x/examples/udm-files/on_boot.d/files/.profile index a1dc852..e311db2 100644 --- a/on-boot-script-2.x/examples/udm-files/on_boot.d/files/.profile +++ b/on-boot-script-2.x/examples/udm-files/on_boot.d/files/.profile @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash alias -='cd -' alias ...=../.. diff --git a/on-boot-script-2.x/examples/udm-files/on_boot.d/iptables_timerestrict.sh b/on-boot-script-2.x/examples/udm-files/on_boot.d/iptables_timerestrict.sh index af498a6..1be57a9 100644 --- a/on-boot-script-2.x/examples/udm-files/on_boot.d/iptables_timerestrict.sh +++ b/on-boot-script-2.x/examples/udm-files/on_boot.d/iptables_timerestrict.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/on-boot-script-2.x/examples/udm-networking/on_boot.d/06-cni-bridge.sh b/on-boot-script-2.x/examples/udm-networking/on_boot.d/06-cni-bridge.sh index 2dccb17..b1d33b9 100644 --- a/on-boot-script-2.x/examples/udm-networking/on_boot.d/06-cni-bridge.sh +++ b/on-boot-script-2.x/examples/udm-networking/on_boot.d/06-cni-bridge.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash ## Create network bridge for CNI diff --git a/on-boot-script-2.x/manual-install/install.sh b/on-boot-script-2.x/manual-install/install.sh index dfabb90..ac1c755 100644 --- a/on-boot-script-2.x/manual-install/install.sh +++ b/on-boot-script-2.x/manual-install/install.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Download and install the service podman exec unifi-os curl -fsSLo /lib/systemd/system/udm-boot.service https://raw.githubusercontent.com/unifi-utilities/unifios-utilities/main/on-boot-script/dpkg-build-files/udm-boot.service diff --git a/on-boot-script/README.md b/on-boot-script/README.md index caaaeaa..d78df1d 100644 --- a/on-boot-script/README.md +++ b/on-boot-script/README.md @@ -58,7 +58,7 @@ This will also install CNI Plugins & CNI Bridge scripts. If you are using UDMSE/ exit ``` -3. Copy any shell scripts you want to run to /data/on_boot.d on your UDM (not the unifi-os shell) and make sure they are executable and have the correct shebang (#!/bin/sh). Additionally, scripts need to have a `.sh` extention in their filename. +3. Copy any shell scripts you want to run to /data/on_boot.d on your UDM (not the unifi-os shell) and make sure they are executable and have the correct shebang (#!/bin/bash). Additionally, scripts need to have a `.sh` extention in their filename. Examples: diff --git a/on-boot-script/README.old.md b/on-boot-script/README.old.md index d60fb70..c937d21 100644 --- a/on-boot-script/README.old.md +++ b/on-boot-script/README.old.md @@ -5,7 +5,7 @@ - NB! THESE WILL NOT PERSIST THROUGH FIRMWARE. They still work however 1. Copy [install.sh](manual-install/install.sh) to your UDM and execute it -1. Copy any shell scripts you want to run to /data/on_boot.d and make sure they are executable and have the correct shebang (#!/bin/sh) +1. Copy any shell scripts you want to run to /data/on_boot.d and make sure they are executable and have the correct shebang (#!/bin/bash) Examples: - Start a DNS Container [10-dns.sh](../dns-common/on_boot.d/10-dns.sh) - Start wpa_supplicant [on_boot.d/10-wpa_supplicant.sh](examples/udm-files/on_boot.d/10-start-containers.sh) @@ -31,7 +31,7 @@ 3. make a script that sshs to the udm and runs on our boot script. 127.0.1.1 always points to the UDM ```sh - echo "#!/bin/sh + echo "#!/bin/bash ssh -o StrictHostKeyChecking=no root@127.0.1.1 '/data/on_boot.sh'" > /etc/init.d/udm.sh chmod u+x /etc/init.d/udm.sh ``` diff --git a/on-boot-script/build_deb.sh b/on-boot-script/build_deb.sh index 00ea955..3abedb1 100755 --- a/on-boot-script/build_deb.sh +++ b/on-boot-script/build_deb.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e diff --git a/on-boot-script/examples/udm-files/on_boot.d/10-shell-profile.sh b/on-boot-script/examples/udm-files/on_boot.d/10-shell-profile.sh index 4998125..5b6642d 100644 --- a/on-boot-script/examples/udm-files/on_boot.d/10-shell-profile.sh +++ b/on-boot-script/examples/udm-files/on_boot.d/10-shell-profile.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/on-boot-script/examples/udm-files/on_boot.d/10-wpa_supplicant.sh b/on-boot-script/examples/udm-files/on_boot.d/10-wpa_supplicant.sh index 29a75ca..6d94fe4 100644 --- a/on-boot-script/examples/udm-files/on_boot.d/10-wpa_supplicant.sh +++ b/on-boot-script/examples/udm-files/on_boot.d/10-wpa_supplicant.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash ## create files like this with different numbers for execution order ## ala /etc/profile.d diff --git a/on-boot-script/examples/udm-files/on_boot.d/15-add-.profile.sh b/on-boot-script/examples/udm-files/on_boot.d/15-add-.profile.sh index b524b38..c4c1417 100755 --- a/on-boot-script/examples/udm-files/on_boot.d/15-add-.profile.sh +++ b/on-boot-script/examples/udm-files/on_boot.d/15-add-.profile.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/on-boot-script/examples/udm-files/on_boot.d/15-add-github-ssh-keys.sh b/on-boot-script/examples/udm-files/on_boot.d/15-add-github-ssh-keys.sh index b934b1c..b99d3c7 100644 --- a/on-boot-script/examples/udm-files/on_boot.d/15-add-github-ssh-keys.sh +++ b/on-boot-script/examples/udm-files/on_boot.d/15-add-github-ssh-keys.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" diff --git a/on-boot-script/examples/udm-files/on_boot.d/15-add-root-ssh-keys.sh b/on-boot-script/examples/udm-files/on_boot.d/15-add-root-ssh-keys.sh index 70e7646..990f9e1 100644 --- a/on-boot-script/examples/udm-files/on_boot.d/15-add-root-ssh-keys.sh +++ b/on-boot-script/examples/udm-files/on_boot.d/15-add-root-ssh-keys.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/on-boot-script/examples/udm-files/on_boot.d/15-add-ssh-known-hosts.sh b/on-boot-script/examples/udm-files/on_boot.d/15-add-ssh-known-hosts.sh index 17fe07b..616470b 100644 --- a/on-boot-script/examples/udm-files/on_boot.d/15-add-ssh-known-hosts.sh +++ b/on-boot-script/examples/udm-files/on_boot.d/15-add-ssh-known-hosts.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash ##################################################### # ADD KNOWN HOSTS AS BELOW - CHANGE BEFORE RUNNING # diff --git a/on-boot-script/examples/udm-files/on_boot.d/15-preserve-history.sh b/on-boot-script/examples/udm-files/on_boot.d/15-preserve-history.sh index 2a7f82b..78cbe79 100755 --- a/on-boot-script/examples/udm-files/on_boot.d/15-preserve-history.sh +++ b/on-boot-script/examples/udm-files/on_boot.d/15-preserve-history.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/on-boot-script/examples/udm-files/on_boot.d/20-ntopng-udm.sh b/on-boot-script/examples/udm-files/on_boot.d/20-ntopng-udm.sh index 21152ad..fc2e9e4 100644 --- a/on-boot-script/examples/udm-files/on_boot.d/20-ntopng-udm.sh +++ b/on-boot-script/examples/udm-files/on_boot.d/20-ntopng-udm.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash ## create files like this with different numbers for execution order ## ala /etc/profile.d diff --git a/on-boot-script/examples/udm-files/on_boot.d/25-add-cron-jobs.sh b/on-boot-script/examples/udm-files/on_boot.d/25-add-cron-jobs.sh index 6326a2d..7995730 100644 --- a/on-boot-script/examples/udm-files/on_boot.d/25-add-cron-jobs.sh +++ b/on-boot-script/examples/udm-files/on_boot.d/25-add-cron-jobs.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/on-boot-script/examples/udm-files/on_boot.d/50-start-node-exporter.sh b/on-boot-script/examples/udm-files/on_boot.d/50-start-node-exporter.sh index cb265e5..d36928f 100755 --- a/on-boot-script/examples/udm-files/on_boot.d/50-start-node-exporter.sh +++ b/on-boot-script/examples/udm-files/on_boot.d/50-start-node-exporter.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash CONTAINER=node-exporter diff --git a/on-boot-script/examples/udm-files/on_boot.d/files/.profile b/on-boot-script/examples/udm-files/on_boot.d/files/.profile index a1dc852..e311db2 100644 --- a/on-boot-script/examples/udm-files/on_boot.d/files/.profile +++ b/on-boot-script/examples/udm-files/on_boot.d/files/.profile @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash alias -='cd -' alias ...=../.. diff --git a/on-boot-script/examples/udm-files/on_boot.d/iptables_timerestrict.sh b/on-boot-script/examples/udm-files/on_boot.d/iptables_timerestrict.sh index af498a6..1be57a9 100644 --- a/on-boot-script/examples/udm-files/on_boot.d/iptables_timerestrict.sh +++ b/on-boot-script/examples/udm-files/on_boot.d/iptables_timerestrict.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/on-boot-script/examples/udm-networking/on_boot.d/06-cni-bridge.sh b/on-boot-script/examples/udm-networking/on_boot.d/06-cni-bridge.sh index 2dccb17..b1d33b9 100644 --- a/on-boot-script/examples/udm-networking/on_boot.d/06-cni-bridge.sh +++ b/on-boot-script/examples/udm-networking/on_boot.d/06-cni-bridge.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash ## Create network bridge for CNI diff --git a/on-boot-script/manual-install/install.sh b/on-boot-script/manual-install/install.sh index dfabb90..ac1c755 100644 --- a/on-boot-script/manual-install/install.sh +++ b/on-boot-script/manual-install/install.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Download and install the service podman exec unifi-os curl -fsSLo /lib/systemd/system/udm-boot.service https://raw.githubusercontent.com/unifi-utilities/unifios-utilities/main/on-boot-script/dpkg-build-files/udm-boot.service diff --git a/persist-changes/README.md b/persist-changes/README.md index 8748e9f..f4eee81 100644 --- a/persist-changes/README.md +++ b/persist-changes/README.md @@ -23,7 +23,7 @@ For example, [configuring two IP addresses on your WAN interface, so that you ca `/data/scripts/on-state-change.sh` ``` -#!/bin/sh +#!/bin/bash # give port9 this IP, allows access to router web interface ip addr add 192.168.0.2/24 dev eth8 || true diff --git a/persist-changes/on_boot.d/42-watch-for-changes.sh b/persist-changes/on_boot.d/42-watch-for-changes.sh index 55ad24a..b8949f6 100644 --- a/persist-changes/on_boot.d/42-watch-for-changes.sh +++ b/persist-changes/on_boot.d/42-watch-for-changes.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/persist-changes/scripts/on-state-change.sh b/persist-changes/scripts/on-state-change.sh index 6966f58..dfef0ee 100644 --- a/persist-changes/scripts/on-state-change.sh +++ b/persist-changes/scripts/on-state-change.sh @@ -1,3 +1,3 @@ -#!/bin/sh +#!/bin/bash # edit this file with your custom instructions... \ No newline at end of file diff --git a/podman-install/on_boot.d/00-podman.sh b/podman-install/on_boot.d/00-podman.sh index 147802b..89ec50f 100755 --- a/podman-install/on_boot.d/00-podman.sh +++ b/podman-install/on_boot.d/00-podman.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash if which unifi-os >/dev/null 2>&1; then echo 'Cowardly refusing to install on UDM 1.x' diff --git a/podman-update/01-podman-update.sh b/podman-update/01-podman-update.sh index 6459be6..b6694ee 100644 --- a/podman-update/01-podman-update.sh +++ b/podman-update/01-podman-update.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/python/install_pip.sh b/python/install_pip.sh index 3ec0d52..644f378 100644 --- a/python/install_pip.sh +++ b/python/install_pip.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash cd /tmp curl -L https://bootstrap.pypa.io/get-pip.py -o get-pip.py ln -s $(podman inspect unifi-os -f {{.GraphDriver.Data.MergedDir}})/usr/lib/aarch64-linux-gnu/libssl.so.1.1 /usr/lib64/ diff --git a/python/on_boot.d/20-python.sh b/python/on_boot.d/20-python.sh index 8cc6705..3614991 100644 --- a/python/on_boot.d/20-python.sh +++ b/python/on_boot.d/20-python.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash ln -s $(podman inspect unifi-os -f {{.GraphDriver.Data.MergedDir}})/usr/bin/python3 /usr/bin/python #if you install pip diff --git a/rclone/10-rclone.sh b/rclone/10-rclone.sh index 1918e12..e5d5873 100644 --- a/rclone/10-rclone.sh +++ b/rclone/10-rclone.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash CONTAINER=rclone # Get DataDir location DATA_DIR="/data" diff --git a/rclone/rclone b/rclone/rclone index 1764bca..19d609d 100644 --- a/rclone/rclone +++ b/rclone/rclone @@ -1,3 +1,3 @@ -#!/bin/sh +#!/bin/bash podman exec -ti rclone sh -x /data/sync.sh \ No newline at end of file diff --git a/run-pihole/custom_pihole_dote.sh b/run-pihole/custom_pihole_dote.sh index 2666b05..10565b9 100755 --- a/run-pihole/custom_pihole_dote.sh +++ b/run-pihole/custom_pihole_dote.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in @@ -36,7 +36,7 @@ cat >"${tmpdir}/Dockerfile" < /etc/cont-init.d/10-dote.sh && chmod 775 /etc/cont-init.d/10-dote.sh +RUN chmod +x /opt/dote && mkdir -p /etc/cont-init.d/ && echo -e "#!/bin/bash\n/opt/dote \\\$DOTE_OPTS -d\n" > /etc/cont-init.d/10-dote.sh && chmod 775 /etc/cont-init.d/10-dote.sh EOF podman pull pihole/pihole:latest diff --git a/suricata/on_boot.d/25-suricata.sh b/suricata/on_boot.d/25-suricata.sh index 4646354..ef5fe27 100644 --- a/suricata/on_boot.d/25-suricata.sh +++ b/suricata/on_boot.d/25-suricata.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in @@ -29,7 +29,7 @@ fi APP_PID="/run/suricata.pid" cat <<"EOF" >/tmp/suricata.sh -#!/bin/sh +#!/bin/bash CUSTOM_RULES="${DATA_DIR}/suricata-rules" for file in $(find ${CUSTOM_RULES} -name '*.rules' -print) diff --git a/tailscale/on_boot.d/20-tailscale.sh b/tailscale/on_boot.d/20-tailscale.sh index 62105a4..a18dea6 100755 --- a/tailscale/on_boot.d/20-tailscale.sh +++ b/tailscale/on_boot.d/20-tailscale.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash CONTAINER=tailscale # Starts a container for the tailscale agent. diff --git a/unbound/on_boot.d/11-unbound-macvlanip.sh b/unbound/on_boot.d/11-unbound-macvlanip.sh index 54e1c08..e51b343 100644 --- a/unbound/on_boot.d/11-unbound-macvlanip.sh +++ b/unbound/on_boot.d/11-unbound-macvlanip.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/unbound/scripts/init_unbound.sh b/unbound/scripts/init_unbound.sh index 575169a..e3d977e 100755 --- a/unbound/scripts/init_unbound.sh +++ b/unbound/scripts/init_unbound.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/unbound/scripts/upd_unbound.sh b/unbound/scripts/upd_unbound.sh index 6e7bc3e..8c6c328 100755 --- a/unbound/scripts/upd_unbound.sh +++ b/unbound/scripts/upd_unbound.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in diff --git a/wireguard-go/on_boot.d/20-wireguard.sh b/wireguard-go/on_boot.d/20-wireguard.sh index 9a38cfd..b798125 100644 --- a/wireguard-go/on_boot.d/20-wireguard.sh +++ b/wireguard-go/on_boot.d/20-wireguard.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" diff --git a/zerotier-one/20-zerotier.sh b/zerotier-one/20-zerotier.sh index 4105133..851bc58 100755 --- a/zerotier-one/20-zerotier.sh +++ b/zerotier-one/20-zerotier.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Get DataDir location DATA_DIR="/data" case "$(ubnt-device-info firmware || true)" in