This repository has been archived by the owner on Feb 27, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from huangsam/master
Add uninstaller and comply with shellcheck
- Loading branch information
Showing
2 changed files
with
45 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# Uninstall Script | ||
|
||
if [ "$(which boot2docker)" == "" ]; then | ||
echo "boot2docker does not exist on your machine!" | ||
exit 1 | ||
fi | ||
|
||
if [ "${USER}" != "root" ]; then | ||
echo "$0 must be run as root!" | ||
exit 2 | ||
fi | ||
|
||
echo "Stopping boot2docker processes..." | ||
boot2docker stop && boot2docker delete | ||
|
||
echo "Removing boot2docker executable..." | ||
rm -f /usr/local/bin/boot2docker | ||
|
||
echo "Removing boot2docker ISO and socket files..." | ||
rm -rf ~/.boot2docker | ||
rm -rf /usr/local/share/boot2docker | ||
|
||
echo "Removing boot2docker SSH keys..." | ||
rm -f ~/.ssh/id_boot2docker* | ||
|
||
echo "Removing boot2docker OSX files..." | ||
rm -f /private/var/db/receipts/io.boot2docker.* | ||
rm -f /private/var/db/receipts/io.boot2dockeriso.* | ||
|
||
echo "Removing Docker executable..." | ||
rm -f /usr/local/bin/docker | ||
|
||
echo "All Done!" |