Use python keyring package and move rc files to /etc/anvil (the new master location)
1. Move the rc files to /etc/anvil as well 2. Add in usage of python keyring package and use it to store/fetch passwords instead of our own yaml password storage. This also allows for us to use a encrypted password storage (not turned on by default) if desired which is a nice to have. 3. Passwords are now stored in 'passwords.cfg' under /etc/anvil (which should be fine for now and can be relocated via a cli option if desired)
This commit is contained in:
12
smithy
12
smithy
@@ -74,25 +74,15 @@ EOF
|
||||
return 1
|
||||
fi
|
||||
echo "Installing needed pypi dependencies:"
|
||||
pip-python install -U -I termcolor iniparse
|
||||
pip-python install -U -I termcolor iniparse "keyring==0.9.2"
|
||||
if [ $? -ne 0 ]; then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
load_rc_files()
|
||||
{
|
||||
for i in `ls *.rc 2>/dev/null`; do
|
||||
if [ -f "$i" ]; then
|
||||
source "$i"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
run_smithy()
|
||||
{
|
||||
load_rc_files
|
||||
PYTHON=`which python`
|
||||
exec $PYTHON anvil $ARGS
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user