From 5672c62ca92346b72eb4ddae7b7bb8d2dab48228 Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Wed, 23 Jan 2013 13:34:06 -0800 Subject: [PATCH] add scripts to load & unload all launch services (OS X) --- services-load | 11 +++++++++++ services-unload | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100755 services-load create mode 100755 services-unload diff --git a/services-load b/services-load new file mode 100755 index 0000000..fbb013f --- /dev/null +++ b/services-load @@ -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 diff --git a/services-unload b/services-unload new file mode 100755 index 0000000..ebba525 --- /dev/null +++ b/services-unload @@ -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