mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-28 03:03:51 -04:00
Add support for remotely managed tunnel
This commit is contained in:
@@ -40,7 +40,9 @@ fi
|
||||
cloudflared -v
|
||||
|
||||
echo "**** Checking for cloudflare tunnel parameters... ****"
|
||||
if [[ ${#CF_ZONE_ID} -gt 0 ]] && [[ ${#CF_ACCOUNT_ID} -gt 0 ]] && [[ ${#CF_API_TOKEN} -gt 0 ]] && [[ ${#CF_TUNNEL_NAME} -gt 0 ]] && [[ ${#CF_TUNNEL_CONFIG} -gt 0 ]]; then
|
||||
if [[ -n "${CF_REMOTE_MANAGE_TOKEN}" ]]; then
|
||||
echo "**** CF_REMOTE_MANAGE_TOKEN is set, cloudflared will attempt to connect to existing tunnel ****"
|
||||
elif [[ ${#CF_ZONE_ID} -gt 0 ]] && [[ ${#CF_ACCOUNT_ID} -gt 0 ]] && [[ ${#CF_API_TOKEN} -gt 0 ]] && [[ ${#CF_TUNNEL_NAME} -gt 0 ]] && [[ ${#CF_TUNNEL_CONFIG} -gt 0 ]]; then
|
||||
if [[ ${#CF_TUNNEL_PASSWORD} -lt 32 ]]; then
|
||||
echo "**** Cloudflare tunnel password must be at least 32 characters long, exiting... ****"
|
||||
exit 1
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
if [[ $(uname -m) = "armv7l" ]]; then
|
||||
echo "**** The universal cloudflared mod no longer supports arm32v7/armhf per https://info.linuxserver.io/issues/2023-07-01-armhf/ ****"
|
||||
sleep infinity
|
||||
echo "**** The universal cloudflared mod no longer supports arm32v7/armhf per https://info.linuxserver.io/issues/2023-07-01-armhf/ ****"
|
||||
sleep infinity
|
||||
fi
|
||||
|
||||
if [[ ${#CF_ZONE_ID} -gt 0 ]] && [[ ${#CF_ACCOUNT_ID} -gt 0 ]] && [[ ${#CF_API_TOKEN} -gt 0 ]] && [[ ${#CF_TUNNEL_NAME} -gt 0 ]] && [[ ${#CF_TUNNEL_CONFIG} -gt 0 ]] && [[ ${#CF_TUNNEL_PASSWORD} -gt 31 ]]; then
|
||||
if [[ -n "${CF_REMOTE_MANAGE_TOKEN}" ]]; then
|
||||
exec s6-setuidgid abc cloudflared tunnel --no-autoupdate run --token ${CF_REMOTE_MANAGE_TOKEN}
|
||||
elif [[ ${#CF_ZONE_ID} -gt 0 ]] && [[ ${#CF_ACCOUNT_ID} -gt 0 ]] && [[ ${#CF_API_TOKEN} -gt 0 ]] && [[ ${#CF_TUNNEL_NAME} -gt 0 ]] && [[ ${#CF_TUNNEL_CONFIG} -gt 0 ]] && [[ ${#CF_TUNNEL_PASSWORD} -gt 31 ]]; then
|
||||
exec s6-setuidgid abc cloudflared tunnel --no-autoupdate --config /etc/cloudflared/config.yml run
|
||||
else
|
||||
echo "**** Issues with cloudflared settings, sleeping ****"
|
||||
|
||||
Reference in New Issue
Block a user