Skip to content

Instantly share code, notes, and snippets.

@OneCDOnly
Last active December 28, 2025 19:46
Show Gist options
  • Select an option

  • Save OneCDOnly/5dfe829f2efd4960e15a5892cb7e5b5c to your computer and use it in GitHub Desktop.

Select an option

Save OneCDOnly/5dfe829f2efd4960e15a5892cb7e5b5c to your computer and use it in GitHub Desktop.
uninstall Malware Remover, and prevent it being installed again during this OS session.
#!/usr/bin/env bash
tab_pathfile=/etc/config/crontab
conf_pathfile=/etc/config/qpkg.conf
uninstall_pathfile=$(getcfg MalwareRemover Install_Path -f $conf_pathfile)/.uninstall.sh
if ! grep malware_remover_install.lck $tab_pathfile &> /dev/null; then
echo '*/2 * * * * /bin/touch /var/lock/malware_remover_install.lck' >> $tab_pathfile
crontab $tab_pathfile && /etc/init.d/crond.sh restart
fi
if [[ -f $uninstall_pathfile ]]; then
setcfg MalwareRemover Sys_App 1 -f $conf_pathfile
eval "$uninstall_pathfile"
rmcfg MalwareRemover -f $conf_pathfile
fi
@OneCDOnly
Copy link
Author

Use with RunLast for fully automated MR installation prevention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment