Skip to content

Commit 30d821a

Browse files
committed
refactor: update activation code scripts to use .done flag
1 parent 72ff937 commit 30d821a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/scripts/activation_code_remove

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# ./usr/local/emhttp/plugins/dynamix.my.servers/scripts/activation_code_remove --debug --remove-setup-flag
2424
#
2525
# Prerequisites:
26-
# - The setup flag file must exist at "/boot/config/activation/.setup".
26+
# - The setup flag file must exist at "/boot/config/activation/.done".
2727
#
2828
# Options:
2929
# --delete Deletes the script itself and related script & php files.
@@ -62,7 +62,7 @@ debug_echo() {
6262
}
6363

6464
ACTIVATION_DIR="/boot/config/activation"
65-
ACTIVATION_SETUP_FLAG="$ACTIVATION_DIR/.setup"
65+
ACTIVATION_SETUP_FLAG="$ACTIVATION_DIR/.done"
6666

6767
debug_echo "Checking for setup flag at $ACTIVATION_SETUP_FLAG"
6868

plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/scripts/activation_code_setup

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ debug_echo "Checking for activation directory at $ACTIVATION_DIR"
7474

7575
if [[ -d "$ACTIVATION_DIR" ]]; then
7676
debug_echo "Activation directory found"
77-
ACTIVATION_SETUP_FLAG="$ACTIVATION_DIR/.setup"
77+
ACTIVATION_SETUP_FLAG="$ACTIVATION_DIR/.done"
7878
ACTIVATION_JSON_EXTENSION=".activationcode"
7979
# get the first file in the dir that matches the extension, later parsed as JSON for specific values
8080
ACTIVATION_JSON=$(find "$ACTIVATION_DIR" -maxdepth 1 -type f -name "*$ACTIVATION_JSON_EXTENSION" | head -n 1)
@@ -275,7 +275,7 @@ if [[ -d "$ACTIVATION_DIR" ]]; then
275275
}' "$CONFIG_FILE" > "${CONFIG_FILE}.tmp" && mv "${CONFIG_FILE}.tmp" "$CONFIG_FILE"
276276
done
277277

278-
# Add what changed to the .setup flag file
278+
# Add what changed to the .done flag file
279279
echo "display" >> "$ACTIVATION_SETUP_FLAG"
280280
debug_echo "Display settings updated"
281281
else
@@ -303,16 +303,16 @@ if [[ -d "$ACTIVATION_DIR" ]]; then
303303
echo "⚠️ Warning: Failed to replace the original case model icon with the custom icon."
304304
else
305305
echo -n "$CUSTOM_CASE_FILE_NAME" > $CASE_MODEL_CFG # set the custom icon in the config file
306-
echo "case: $CUSTOM_CASE_FILE_NAME" >> "$ACTIVATION_SETUP_FLAG" # add what changed to the .setup flag file
306+
echo "case: $CUSTOM_CASE_FILE_NAME" >> "$ACTIVATION_SETUP_FLAG" # add what changed to the .done flag file
307307
debug_echo "Custom case model set"
308308
fi
309309
elif [[ -n "$PARTNER_CASE_ICON" ]]; then
310310
echo -n "$PARTNER_CASE_ICON" > $CASE_MODEL_CFG # set the parsed icon name in the config file
311-
echo "case: $PARTNER_CASE_ICON" >> "$ACTIVATION_SETUP_FLAG" # add what changed to the .setup flag file
311+
echo "case: $PARTNER_CASE_ICON" >> "$ACTIVATION_SETUP_FLAG" # add what changed to the .done flag file
312312
debug_echo "Case model set to $PARTNER_CASE_ICON"
313313
fi
314314
else
315-
echo "case: skipped, already custom" >> "$ACTIVATION_SETUP_FLAG" # add what changed to the .setup flag file
315+
echo "case: skipped, already custom" >> "$ACTIVATION_SETUP_FLAG" # add what changed to the .done flag file
316316
debug_echo "Skipping case model setup, already set as custom icon"
317317
fi
318318
else
@@ -388,7 +388,7 @@ if [[ -d "$ACTIVATION_DIR" ]]; then
388388
debug_echo "System identification updated"
389389
echo "✅ Identification updated: $EM_CMD"
390390

391-
# Add what changed to the .setup flag file
391+
# Add what changed to the .done flag file
392392
echo "identity: $EM_CMD" >> "$ACTIVATION_SETUP_FLAG"
393393
fi
394394
fi

0 commit comments

Comments
 (0)