moved to bash (#499)

thanks @kb9gxk
This commit is contained in:
John Dorman 2023-02-22 21:44:27 -08:00 committed by GitHub
parent ef6b356538
commit df2a0f9144
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
61 changed files with 64 additions and 64 deletions

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
CONTAINER=cloudflare-ddns
# Get DataDir location
DATA_DIR="/data"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"

View File

@ -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

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
CONTAINER=haproxy
# Get DataDir location
DATA_DIR="/data"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Place cross compiled version of `socat` in /data/hdhomerun
HDHOMERUN_IP=10.10.30.146

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
CONTAINER=homebridge
# Get DataDir location

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -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:

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -e

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
## create files like this with different numbers for execution order
## ala /etc/profile.d

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
## create files like this with different numbers for execution order
## ala /etc/profile.d

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
CONTAINER=node-exporter

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
alias -='cd -'
alias ...=../..

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
## Create network bridge for CNI

View File

@ -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

View File

@ -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:

View File

@ -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
```

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -e

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
## create files like this with different numbers for execution order
## ala /etc/profile.d

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#####################################################
# ADD KNOWN HOSTS AS BELOW - CHANGE BEFORE RUNNING #

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
## create files like this with different numbers for execution order
## ala /etc/profile.d

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
CONTAINER=node-exporter

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
alias -='cd -'
alias ...=../..

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
## Create network bridge for CNI

View File

@ -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

View File

@ -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

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -1,3 +1,3 @@
#!/bin/sh
#!/bin/bash
# edit this file with your custom instructions...

View File

@ -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'

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -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/

View File

@ -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

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
CONTAINER=rclone
# Get DataDir location
DATA_DIR="/data"

View File

@ -1,3 +1,3 @@
#!/bin/sh
#!/bin/bash
podman exec -ti rclone sh -x /data/sync.sh

View File

@ -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" <<EOF
FROM pihole/pihole:latest
ENV DOTE_OPTS="-s 127.0.0.1:5053"
COPY dote /opt/dote
RUN chmod +x /opt/dote && mkdir -p /etc/cont-init.d/ && echo -e "#!/bin/sh\n/opt/dote \\\$DOTE_OPTS -d\n" > /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

View File

@ -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)

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
CONTAINER=tailscale
# Starts a container for the tailscale agent.

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in