@@ -969,21 +969,6 @@ write_update_restart_service_secretref_env() {
|
969 | 969 | mv "$tmp_path" "$dotenv_path" |
970 | 970 | } |
971 | 971 | |
972 | | -write_update_restart_service_auth_env() { |
973 | | - mkdir -p "$OPENCLAW_STATE_DIR" |
974 | | -local dotenv_path="$OPENCLAW_STATE_DIR/.env" |
975 | | -local tmp_path="$dotenv_path.tmp.$$" |
976 | | -if [ -f "$dotenv_path" ]; then |
977 | | - grep -v '^GATEWAY_AUTH_TOKEN_REF=' "$dotenv_path" >"$tmp_path" || true |
978 | | -else |
979 | | -: >"$tmp_path" |
980 | | -fi |
981 | | -printf 'GATEWAY_AUTH_TOKEN_REF=%s\n' "$GATEWAY_AUTH_TOKEN_REF" >>"$tmp_path" |
982 | | - mv "$tmp_path" "$dotenv_path" |
983 | | -local systemd_env_path="$OPENCLAW_STATE_DIR/gateway.systemd.env" |
984 | | -printf 'GATEWAY_AUTH_TOKEN_REF=%s\n' "$GATEWAY_AUTH_TOKEN_REF" >"$systemd_env_path" |
985 | | -} |
986 | | - |
987 | 972 | prepare_update_restart_probe() { |
988 | 973 | if [ "$UPDATE_RESTART_MODE" != "auto-auth" ]; then |
989 | 974 | return 0 |
@@ -996,18 +981,6 @@ prepare_update_restart_probe() {
|
996 | 981 | install_update_restart_service_unit |
997 | 982 | } |
998 | 983 | |
999 | | -prepare_update_restart_probe_current_install() { |
1000 | | -if [ "$UPDATE_RESTART_MODE" != "auto-auth" ]; then |
1001 | | -return 0 |
1002 | | -fi |
1003 | | -echo "Preparing candidate-auth gateway for automatic update restart." |
1004 | | - install_update_restart_systemctl_shim |
1005 | | - seed_update_restart_probe_device_auth |
1006 | | - start_gateway |
1007 | | - write_update_restart_service_auth_env |
1008 | | - install_update_restart_service_unit |
1009 | | -} |
1010 | | - |
1011 | 984 | assert_baseline_state() { |
1012 | 985 | OPENCLAW_UPGRADE_SURVIVOR_ASSERT_STAGE=baseline \ |
1013 | 986 | node scripts/e2e/lib/upgrade-survivor/assertions.mjs assert-config |
|