Create uninstaller shell script

This commit is contained in:
Martin Raiber 2015-03-31 23:17:21 +02:00
parent 540a43b808
commit 9b2a9d00a8
2 changed files with 26 additions and 1 deletions

View File

@ -30,4 +30,13 @@ productbuild --distribution osx_installer/distribution.xml --resources osx_insta
#sudo pkgutil --forget org.urbackup.client
#sudo pkgutil --forget org.urbackup.client.frontend.pkg
#sudo pkgutil --forget org.urbackup.client.frontend2.pkg
#sudo rm -R "/Applications/UrBackup Client.app"
#sudo rm -R "/Applications/UrBackup Client.app"
echo "#!/bin/sh" > uninstall2.sh
cd osx-pkg
find . -type f -exec echo rm -fv /{} \; >> ../uninstall2.sh
cd ..
cd osx-pkg2
find . -type f -exec echo rm -fv /{} \; >> ../uninstall2.sh
cd ..

View File

@ -0,0 +1,16 @@
#!/bin/sh
if /bin/launchctl list "org.urbackup.client.backend" &> /dev/null; then
/bin/launchctl stop "org.urbackup.client.backend"
/bin/launchctl unload "/Library/LaunchDaemons/org.urbackup.client.plist"
fi
if /bin/launchctl list "org.urbackup.client.frontend" &> /dev/null; then
/bin/launchctl stop "org.urbackup.client.frontend"
/bin/launchctl unload "/Library/LaunchAgents/org.urbackup.client.plist"
fi
pkgutil --forget org.urbackup.client
pkgutil --forget org.urbackup.client.frontend2.pkg
sh $PWD/uninstall2.sh