Permalink
Browse files

Add script to take backup keychains.

triggered by launchd.
  • Loading branch information...
hnagato committed Mar 5, 2012
1 parent 5ba6b7a commit 433c6823e09175734186f308336d32a62cad8a39
Showing with 12 additions and 0 deletions.
  1. +12 −0 bin/backup-keychain
View
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+set -e
+
+LOGIN_KEYCHAIN_DEST=/Volumes/Vault/Library/Keychains
+[[ -w $LOGIN_KEYCHAIN_DEST/login.keychain ]] &&
+ cp -f $HOME/Library/Keychains/login.keychain $LOGIN_KEYCHAIN_DEST/
+
+SYSTEM_KEYCHAIN_DEST=/Volumes/Vault/Library/SystemKeychains
+[[ -w $SYSTEM_KEYCHAIN_DEST/System.keychain ]] &&
+ cp -f /Library/Keychains/System.keychain $SYSTEM_KEYCHAIN_DEST/
+

0 comments on commit 433c682

Please sign in to comment.