rename project to runaway
This commit is contained in:
+14
-14
@@ -1,12 +1,12 @@
|
||||
do_uninstall() {
|
||||
header "Unleash — Full Uninstall"
|
||||
header "Runaway — Full Uninstall"
|
||||
|
||||
if ! is_root; then
|
||||
error_exit "Uninstall needs sudo: sudo ./unleash uninstall"
|
||||
error_exit "Uninstall needs sudo: sudo ./runaway uninstall"
|
||||
fi
|
||||
|
||||
begin "Removing heal LaunchDaemon"
|
||||
local plist="/Library/LaunchDaemons/com.unleash.heal.plist"
|
||||
local plist="/Library/LaunchDaemons/com.runaway.heal.plist"
|
||||
if [ -f "$plist" ]; then
|
||||
launchctl unload "$plist" 2>/dev/null || true
|
||||
rm -f "$plist"
|
||||
@@ -16,7 +16,7 @@ do_uninstall() {
|
||||
fi
|
||||
|
||||
begin "Removing monitor LaunchDaemon"
|
||||
plist="/Library/LaunchDaemons/com.unleash.monitor.plist"
|
||||
plist="/Library/LaunchDaemons/com.runaway.monitor.plist"
|
||||
if [ -f "$plist" ]; then
|
||||
launchctl unload "$plist" 2>/dev/null || true
|
||||
rm -f "$plist"
|
||||
@@ -26,17 +26,17 @@ do_uninstall() {
|
||||
fi
|
||||
|
||||
begin "Cleaning pf anchors"
|
||||
local anchors=("/etc/pf.anchors/com.unleash/mdm" "/etc/pf.anchors/com.unleash.selective")
|
||||
local anchors=("/etc/pf.anchors/com.runaway/mdm" "/etc/pf.anchors/com.runaway.selective")
|
||||
for a in "${anchors[@]}"; do
|
||||
[ -f "$a" ] && rm -f "$a"
|
||||
done
|
||||
for anchor_name in "com.unleash/mdm" "com.unleash.selective"; do
|
||||
for anchor_name in "com.runaway/mdm" "com.runaway.selective"; do
|
||||
pfctl -a "$anchor_name" -F all 2>/dev/null || true
|
||||
done
|
||||
local pf_conf="/etc/pf.conf"
|
||||
if [ -f "$pf_conf" ]; then
|
||||
sed -i '' '/# Added by unleash/d' "$pf_conf" 2>/dev/null || true
|
||||
sed -i '' '/com\.unleash/d' "$pf_conf" 2>/dev/null || true
|
||||
sed -i '' '/# Added by runaway/d' "$pf_conf" 2>/dev/null || true
|
||||
sed -i '' '/com\.runaway/d' "$pf_conf" 2>/dev/null || true
|
||||
fi
|
||||
pfctl -f /etc/pf.conf 2>/dev/null || true
|
||||
end_ok
|
||||
@@ -44,7 +44,7 @@ do_uninstall() {
|
||||
begin "Cleaning hosts entries"
|
||||
local hosts="/private/etc/hosts"
|
||||
if [ -f "$hosts" ]; then
|
||||
sed -i '' '/# Added by unleash/d' "$hosts" 2>/dev/null || true
|
||||
sed -i '' '/# Added by runaway/d' "$hosts" 2>/dev/null || true
|
||||
local domains=("iprofiles.apple.com" "deviceenrollment.apple.com" "mdmenrollment.apple.com")
|
||||
for d in "${domains[@]}"; do
|
||||
sed -i '' "/[[:space:]]$d/d" "$hosts" 2>/dev/null || true
|
||||
@@ -68,7 +68,7 @@ do_uninstall() {
|
||||
fi
|
||||
|
||||
begin "Removing backup directory"
|
||||
local backup=".unleash-backup"
|
||||
local backup=".runaway-backup"
|
||||
if [ -d "$backup" ]; then
|
||||
rm -rf "$backup" 2>/dev/null || true
|
||||
end_ok
|
||||
@@ -77,15 +77,15 @@ do_uninstall() {
|
||||
fi
|
||||
|
||||
begin "Removing config file"
|
||||
if [ -f "$HOME/.unleash.conf" ]; then
|
||||
rm -f "$HOME/.unleash.conf"
|
||||
if [ -f "$HOME/.runaway.conf" ]; then
|
||||
rm -f "$HOME/.runaway.conf"
|
||||
end_ok
|
||||
else
|
||||
end_fail; echo " Not found"
|
||||
fi
|
||||
|
||||
begin "Stopping monitor if running"
|
||||
local pidfile="/tmp/unleash-monitor.pid"
|
||||
local pidfile="/tmp/runaway-monitor.pid"
|
||||
if [ -f "$pidfile" ]; then
|
||||
kill "$(cat "$pidfile")" 2>/dev/null || true
|
||||
rm -f "$pidfile"
|
||||
@@ -97,5 +97,5 @@ do_uninstall() {
|
||||
echo ""
|
||||
success "Uninstall complete"
|
||||
info "Your system is back to its original state."
|
||||
info "The unleash script itself was not removed."
|
||||
info "The runaway script itself was not removed."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user