Skip to content

Commit 6ef7f50

Browse files
committed
refactor: update activation code removal script to delete by default
- Changed the activation code removal script to use a dry-run flag instead of a self-delete flag, enhancing safety during execution. - Updated the plugin file to reflect the removal of the --delete option, ensuring consistency with the new script behavior.
1 parent a411913 commit 6ef7f50

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

plugin/plugins/dynamix.unraid.net.plg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ version=
166166
source /etc/unraid-version
167167
168168
# Undo some activation / partner setup
169-
source /usr/local/emhttp/plugins/dynamix.my.servers/scripts/activation_code_remove --delete
169+
source /usr/local/emhttp/plugins/dynamix.my.servers/scripts/activation_code_remove
170170
171171
echo
172172
echo "⚠️ Do not close this window yet"

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@
3434

3535
# Default flags
3636
DEBUG_MODE=false
37-
SELF_DELETE=false
37+
DRY_RUN=false
3838
REMOVE_SETUP_FLAG=false
3939
# Check for flags
4040
for arg in "$@"; do
4141
case $arg in
4242
--debug)
4343
DEBUG_MODE=true
4444
;;
45-
--delete)
46-
SELF_DELETE=true
45+
--dry-run)
46+
DRY_RUN=true
4747
;;
4848
--remove-setup-flag)
4949
REMOVE_SETUP_FLAG=true
@@ -125,7 +125,7 @@ if [[ -f "$ACTIVATION_SETUP_FLAG" ]]; then
125125
debug_echo "Setup flag removed"
126126
fi
127127

128-
if [[ $SELF_DELETE == true ]]; then
128+
if [[ $DRY_RUN == false ]]; then
129129
debug_echo "Deleting activation code related setup and php files"
130130
FILES_TO_DELETE=(
131131
"/usr/local/emhttp/plugins/dynamix.my.servers/data/activation-data.php"

0 commit comments

Comments
 (0)