-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·30 lines (23 loc) · 1.16 KB
/
install.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
#!/usr/bin/env bash
# sudo this script to get everything into place, run from inside the dir
CURRDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DESTDIR="/usr/local"
# move the executable script into bin
sudo mkdir -p $DESTDIR/bin
sudo cp $CURRDIR/automysqlbackup.sh $DESTDIR/bin/
sudo chmod +x $DESTDIR/bin/automysqlbackup.sh
# move the config script into etc
sudo mkdir -p $DESTDIR/etc/automysqlbackup
sudo cp $CURRDIR/automysqlbackup.conf $DESTDIR/etc/automysqlbackup/
sudo chown -R root:admin $DESTDIR/etc/automysqlbackup
sudo chmod 770 $DESTDIR/etc/automysqlbackup
sudo chmod 760 $DESTDIR/etc/automysqlbackup/automysqlbackup.conf
# Move the mysql-post install script into place
# Make sure it works first.
# TODO Move the PATH script from the binary exec into the conf file.
# Determine if mail can be disabled all together
# Move the launchd interval script into place, change the permissions
# Perhaps the RunAtLoad is not needed?
sudo cp $CURRDIR/com.sologroup.automysqlbackup.plist /Library/LaunchDaemons/
sudo chown root:wheel /Library/LaunchDaemons/com.sologroup.automysqlbackup.plist
sudo chmod 644 /Library/LaunchDaemons/com.sologroup.automysqlbackup.plist