Files
driver-manager/uninstall.sh

24 lines
649 B
Bash
Raw Normal View History

#!/system/bin/sh
# Driver Manager v2 - Uninstall Script
# Runs when module is removed via KernelSU
MODDIR=${0%/*}
# Kill running processes
for pidfile in "$MODDIR"/run/*.pid; do
[ -f "$pidfile" ] && kill $(cat "$pidfile") 2>/dev/null
done
# Unmount any active driver scopes
if [ -f "$MODDIR/scripts/scope_manager.sh" ]; then
sh "$MODDIR/scripts/scope_manager.sh" unmount_all 2>/dev/null
fi
# Unload managed kernel modules
if [ -f "$MODDIR/scripts/ko_manager.sh" ]; then
sh "$MODDIR/scripts/ko_manager.sh" unload_all 2>/dev/null
fi
# Config and data stay in /data/adb/modules/driver-manager/
# which KernelSU cleans up automatically