-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdaemons.sh
executable file
·33 lines (20 loc) · 1.22 KB
/
daemons.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# Ask for the administrator password upfront
DOTFILES=`pwd`
echo "[+] Unloading..."
#launchctl unload -w ~/Library/LaunchAgents/org.brunocvcunha.personal.audiohijack.plist || true
launchctl unload -w ~/Library/LaunchAgents/org.brunocvcunha.personal.jenkins.plist || true
if [ -f /Library/LaunchAgents/org.brunocvcunha.personal.updatedb.plist ]; then
sudo launchctl unload -w /Library/LaunchAgents/org.brunocvcunha.personal.updatedb.plist || true
fi
echo "[+] Copying..."
#ln -s $DOTFILES/launchctl/org.brunocvcunha.personal.audiohijack.plist ~/Library/LaunchAgents/ || true
ln -s $DOTFILES/launchctl/org.brunocvcunha.personal.jenkins.plist ~/Library/LaunchAgents/ || true
sudo cp $DOTFILES/launchctl/org.brunocvcunha.personal.updatedb.plist /Library/LaunchAgents/ || true
echo "[+] Loading..."
#launchctl load -w ~/Library/LaunchAgents/org.brunocvcunha.personal.audiohijack.plist
launchctl load -w ~/Library/LaunchAgents/org.brunocvcunha.personal.jenkins.plist
sudo chmod 600 /Library/LaunchAgents/org.brunocvcunha.personal.updatedb.plist
sudo chown root /Library/LaunchAgents/org.brunocvcunha.personal.updatedb.plist
sudo launchctl load -w /Library/LaunchAgents/org.brunocvcunha.personal.updatedb.plist
echo "[+] Done!"