Created
August 18, 2014 19:34
-
-
Save vrillusions/4b1156054019437d969c to your computer and use it in GitHub Desktop.
Start multiple instances of KeePassX in OS X
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Open a new instance of KeePassX with the specified database | |
# | |
# release: 2014-08-18 | |
# src: https://gist.github.com/vrillusions/4b1156054019437d969c | |
set -e | |
set -u | |
# May be used for below filename | |
readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
# KeePassX DB | |
keepass_db="${script_dir}/keychain.kdb" | |
if [ -f "${keepass_db}" ]; then | |
open -n /Applications/KeePassX.app "${keepass_db}" & | |
else | |
echo "Could not locate ${keepass_db}" | |
echo "Press enter to continue" | |
read $_unused | |
exit 1 | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment