mirror of
https://github.com/unifi-utilities/unifios-utilities.git
synced 2024-08-30 18:32:21 +00:00
parent
ef6b356538
commit
df2a0f9144
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
CONTAINER=cloudflare-ddns
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
|
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
CONTAINER=haproxy
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Place cross compiled version of `socat` in /data/hdhomerun
|
||||
HDHOMERUN_IP=10.10.30.146
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
CONTAINER=homebridge
|
||||
|
||||
# Get DataDir location
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -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:
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
## create files like this with different numbers for execution order
|
||||
## ala /etc/profile.d
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
## create files like this with different numbers for execution order
|
||||
## ala /etc/profile.d
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
CONTAINER=node-exporter
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
alias -='cd -'
|
||||
alias ...=../..
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
## Create network bridge for CNI
|
||||
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
||||
|
@ -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
|
||||
```
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
## create files like this with different numbers for execution order
|
||||
## ala /etc/profile.d
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
#####################################################
|
||||
# ADD KNOWN HOSTS AS BELOW - CHANGE BEFORE RUNNING #
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
## create files like this with different numbers for execution order
|
||||
## ala /etc/profile.d
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
CONTAINER=node-exporter
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
alias -='cd -'
|
||||
alias ...=../..
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
## Create network bridge for CNI
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
# edit this file with your custom instructions...
|
@ -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'
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -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/
|
||||
|
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
CONTAINER=rclone
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
podman exec -ti rclone sh -x /data/sync.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" <<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
|
||||
|
@ -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)
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
CONTAINER=tailscale
|
||||
|
||||
# Starts a container for the tailscale agent.
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
|
Loading…
Reference in New Issue
Block a user