launch skicka when the storage is mounted to backup the storage on google drive backup log is saved at ~/log
-
install skicka https://github.com/google/skicka
-
install
terminal_notifier
if you want to be notificated the start and end of backup. for homebrew runbrew install terminal-notifier
-
place
run_skicka.scpt
at~/Library/Scripts/
(or place wherever you want and rewrite the path inlaunch_on_mount.plist
) -
place
launch_on_mount.plist
at~/Library/LaunchAgents/
-
Config your storage id in
run_skicka.scpt
. (hint: runsystem_profiler SPCardReaderDataType SPUSBDataType
on Terminal or see system profiler App) -
Config your local and remote file/directory path in
run_skicka.scpt
. -
Config the path to
terminal_notifier
andskicka
inrun_skicka.scpt
(note that your$PATH
on terminal won't refrected on the script, so it's better to use full path) -
run
launchctl load ~/Library/LaunchAgents/launch_on_mount.plist
##reference