mirror of
https://github.com/unifi-utilities/unifios-utilities.git
synced 2024-08-30 18:32:21 +00:00
Fix cloudflare data folder (#495)
* Fixed auto path created for att-ipv6 * Fix cloudflare data folder * Fixed zerotier link
This commit is contained in:
parent
30d5f7b21b
commit
3522cb9f5b
@ -69,7 +69,7 @@ Script to persist ssh keys after reboot or firmware update.
|
||||
| WireGuard kernel module | <https://github.com/tusc/wireguard-kmod> | Uses a prebuilt linux kernel module, without the need to move to a custom kernel. |
|
||||
| OpenConnect VPN | <https://github.com/shuguet/openconnect-udm> | OpenConnect VPN Client for the UniFi Dream Machine Pro (Unofficial).|
|
||||
| split-vpn | <https://github.com/peacey/split-vpn> |A split tunnel VPN script for the UDM with policy based routing. This helper script can be used on your UDM to route select VLANs, clients, or even domains through a VPN connection. It supports OpenVPN, WireGuard, and OpenConnect (Cisco AnyConnect) clients running directly on your UDM, and external VPN clients running on other servers on your network. |
|
||||
| Zerotier | <zerotier.com/> |ZeroTier provides network control and P2P functionality · Use ZeroTier to create products which run on their own decentralized networks |
|
||||
| Zerotier | <https://zerotier.com> |ZeroTier provides network control and P2P functionality · Use ZeroTier to create products which run on their own decentralized networks |
|
||||
|
||||
|
||||
## DNS Providers
|
||||
|
@ -26,16 +26,16 @@ Update [config.json](configs/config.json) with the following options:
|
||||
|
||||
## Steps
|
||||
|
||||
2. Make a directory for your configuration
|
||||
1. Make a directory for your configuration, check if you have `/mnt/data/` or `/data/` and adjust accordingly.
|
||||
|
||||
```sh
|
||||
mkdir -p /data/cloudflare-ddns
|
||||
```
|
||||
|
||||
3. Create a [cloudflare-ddns configuration](configs/config.json) in `/data/cloudflare-ddns` and update the configuration to meet your needs.
|
||||
4. Copy [30-cloudflare-ddns.sh](on_boot.d/30-cloudflare-ddns.sh) to `/data/on_boot.d`.
|
||||
5. Execute /data/on_boot.d/[30-cloudflare-ddns.sh](on_boot.d/30-cloudflare-ddns.sh)
|
||||
6. Execute `podman logs cloudflare-ddns` to verify the continer is running without error (ipv6 warnings are normal).
|
||||
2. Create a [cloudflare-ddns configuration](configs/config.json) in `/data/cloudflare-ddns` and update the configuration to meet your needs.
|
||||
3. Copy [30-cloudflare-ddns.sh](on_boot.d/30-cloudflare-ddns.sh) to `/data/on_boot.d`.
|
||||
. Execute /data/on_boot.d/[30-cloudflare-ddns.sh](on_boot.d/30-cloudflare-ddns.sh)
|
||||
5. Execute `podman logs cloudflare-ddns` to verify the continer is running without error (ipv6 warnings are normal).
|
||||
|
||||
### Useful commands
|
||||
|
||||
|
@ -1,5 +1,31 @@
|
||||
#!/bin/sh
|
||||
CONTAINER=cloudflare-ddns
|
||||
# Get DataDir location
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
1*)
|
||||
DATA_DIR="/mnt/data"
|
||||
;;
|
||||
2*)
|
||||
DATA_DIR="/data"
|
||||
;;
|
||||
3*)
|
||||
DATA_DIR="/data"
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: No persistent storage found." 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
# Check if the directory exists
|
||||
if [ ! -d "$DATA_DIR/cloudflare-ddns" ]; then
|
||||
# If it does not exist, create the directory
|
||||
mkdir -p "$DATA_DIR/cloudflare-ddns"
|
||||
echo "Directory '$DATA_DIR/cloudflare-ddns' created."
|
||||
else
|
||||
# If it already exists, print a message
|
||||
echo "Directory '$DATA_DIR/cloudflare-ddns' already exists. Moving on."
|
||||
fi
|
||||
|
||||
# Starts a cloudflare ddns container that is deleted after it is stopped.
|
||||
# All configs stored in /data/cloudflare-ddns
|
||||
@ -10,6 +36,6 @@ else
|
||||
--net=host \
|
||||
--name "$CONTAINER" \
|
||||
--security-opt=no-new-privileges \
|
||||
-v /data/cloudflare-ddns/config.json:/config.json \
|
||||
-v $DATA_DIR/cloudflare-ddns/config.json:/config.json \
|
||||
timothyjmiller/cloudflare-ddns:latest
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user