|
@@ -58,6 +58,7 @@ case "$1" in
|
|
|
printf " -k : SSH key (required, or interactive if not provided)\n"
|
|
|
printf " -p : Port (default: $PORT)\n"
|
|
|
printf " -u : Uninstall Beszel Agent\n"
|
|
|
+ printf " -a : set daily auto-update agent binary\n"
|
|
|
printf " --china-mirrors : Using GitHub mirror sources to resolve network timeout issues in mainland China\n"
|
|
|
printf " -h, --help : Display this help message\n"
|
|
|
exit 0
|
|
@@ -107,6 +108,8 @@ while [ $# -gt 0 ]; do
|
|
|
--china-mirrors)
|
|
|
CHINA_MAINLAND=true
|
|
|
;;
|
|
|
+ -a)
|
|
|
+ AUTO_UPDATE=true
|
|
|
*)
|
|
|
echo "Invalid option: $1" >&2
|
|
|
exit 1
|
|
@@ -414,8 +417,8 @@ EOF
|
|
|
systemctl start beszel-agent.service
|
|
|
|
|
|
|
|
|
- # enable auto-update if environment variable set up
|
|
|
- if [ "${AUTO_UPDATE}" == "true" ]; then
|
|
|
+ # enable auto-update if AUTO_UPDATE variable set up
|
|
|
+ if [ "${AUTO_UPDATE}" = true ]; then
|
|
|
add_autoupdate_service
|
|
|
else
|
|
|
# Prompt for auto-update setup
|