-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cloudflared: update to 2024.8.2 (#6185)
* cloudflared: switch to using config.yml * cloudflared: update to 2024.6.1 * cloudflared: add logging on migration * cloudflared: update to 2024.7.3 * cloudflared: update to 2024.8.2
- Loading branch information
Showing
6 changed files
with
82 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
cloudflared-2024.6.0.tar.gz SHA1 ea76a4a5df9198fde1a879fdabd44ebc623b9762 | ||
cloudflared-2024.6.0.tar.gz SHA256 e75eec7eaf61320f7b5f9f6abc0891285bd3eeebad46b4a5cb53765281a8d88e | ||
cloudflared-2024.6.0.tar.gz MD5 5942d076798577ab687786986598990a | ||
cloudflared-2024.8.2.tar.gz SHA1 6e5caf8d05c90afe4796e197dbd82ad8845538c8 | ||
cloudflared-2024.8.2.tar.gz SHA256 a6fe4be772ebf78f3a4ee615410e70f1aa95dafa1c173509d08fdd2f94bda3a8 | ||
cloudflared-2024.8.2.tar.gz MD5 815a8164ce26fa63b24136d2eb62932c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
token: "@token@" | ||
no-autoupdate: true | ||
management-diagnostics: @management-diagnostics@ | ||
post-quantum: @post-quantum@ | ||
edge-ip-version: "@edge-ip-version@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,35 @@ | ||
TOKEN_FILE="${SYNOPKG_PKGVAR}/token" | ||
CONFIG_FILE="${SYNOPKG_PKGVAR}/config.yml" | ||
|
||
# Read token from file | ||
if [ -e $TOKEN_FILE ]; then | ||
CLOUDFLARED_TOKEN="$(cat $TOKEN_FILE)" | ||
fi | ||
|
||
SERVICE_COMMAND="${SYNOPKG_PKGDEST}/bin/cloudflared --no-autoupdate tunnel run --token ${CLOUDFLARED_TOKEN}" | ||
SERVICE_COMMAND="${SYNOPKG_PKGDEST}/bin/cloudflared tunnel --config ${SYNOPKG_PKGVAR}/config.yml run" | ||
SVC_BACKGROUND=y | ||
SVC_WRITE_PID=y | ||
|
||
service_postinst () | ||
service_postinst() | ||
{ | ||
if [ "${SYNOPKG_PKG_STATUS}" == "INSTALL" ]; then | ||
|
||
# Populate config template | ||
sed -i -e "s|@token@|${wizard_cloudflared_token}|g" \ | ||
-e "s|@management-diagnostics@|${wizard_management_diagnostics}|g" \ | ||
-e "s|@post-quantum@|${wizard_pq}|g" \ | ||
-e "s|@edge-ip-version@|${wizard_edge_ip_version}|g" \ | ||
${CONFIG_FILE} | ||
|
||
fi | ||
} | ||
|
||
service_postupgrade() | ||
{ | ||
# Save token to file | ||
if [ -n "${wizard_cloudflared_token}" ]; then | ||
echo "${wizard_cloudflared_token}" >> ${TOKEN_FILE} | ||
# Migrate from token file if exists | ||
if [ -e $TOKEN_FILE ]; then | ||
echo "Migrate token into ${CONFIG_FILE} and delete ${TOKEN_FILE}" | ||
CLOUDFLARED_TOKEN="$(cat $TOKEN_FILE)" | ||
rm -f $TOKEN_FILE | ||
sed -i -e "s|@token@|${CLOUDFLARED_TOKEN}|g" \ | ||
-e "s|@management-diagnostics@|false|g" \ | ||
-e "s|@post-quantum@|false|g" \ | ||
-e "s|@edge-ip-version@|4|g" \ | ||
${CONFIG_FILE} | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters