add scripts to load & unload all launch services (OS X)

This commit is contained in:
Sami Samhuri 2013-01-23 13:34:06 -08:00
parent 3965af152b
commit 5672c62ca9
2 changed files with 22 additions and 0 deletions

11
services-load Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
for svc in $HOME/Library/LaunchAgents/*; do
echo "* Loading $svc"
launchctl load "$svc"
done
for svc in /Library/LaunchAgents/* /Library/LaunchDaemons/*; do
echo "* Loading $svc"
sudo launchctl load "$svc"
done

11
services-unload Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
for svc in $HOME/Library/LaunchAgents/*; do
echo "* Unloading $svc"
launchctl unload "$svc"
done
for svc in /Library/LaunchAgents/* /Library/LaunchDaemons/*; do
echo "* Unloading $svc"
sudo launchctl unload "$svc"
done