adding bobapassphrase to set passphrase for repos
passphrase is deleted from memory when terminal is closed deleting "BORG_PASSPHRASE" from bobadeleter,bobagrepdeleter,bobarenamer
This commit is contained in:
parent
5922c491a4
commit
7e1bb2a73e
@ -95,6 +95,13 @@ function DirExists {
|
||||
fi
|
||||
}
|
||||
|
||||
function bobapassphrase {
|
||||
stty -echo
|
||||
read -p "Enter borg passphrase : " BORG_PASSPHRASE
|
||||
stty echo
|
||||
echo ""
|
||||
export BORG_PASSPHRASE
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# list and infos functions
|
||||
@ -335,8 +342,6 @@ function bobadeleter {
|
||||
sed -i '1s/^/borg delete -v .::/' $file
|
||||
|
||||
sed -i '1s/^/\n/' $file
|
||||
sed -i '1s/^/export BORG_PASSPHRASE=\"\"\n/' $file
|
||||
sed -i '1s/^/#Quick and dirty fix for repo with passphrase\n/' $file
|
||||
sed -i '1s/^/\n/' $file
|
||||
sed -i '1s/^/#Watch out you'\''re doing, there won'\''t be other confirmation\n/' $file
|
||||
sed -i '1s/^/\n/' $file
|
||||
@ -361,8 +366,6 @@ function bobagrepdeleter {
|
||||
sed -i 's/^/#borg delete -v .::/' $file
|
||||
|
||||
sed -i '1s/^/\n/' $file
|
||||
sed -i '1s/^/export BORG_PASSPHRASE=\"\"\n/' $file
|
||||
sed -i '1s/^/#Quick and dirty fix for repo with passphrase\n/' $file
|
||||
sed -i '1s/^/\n/' $file
|
||||
sed -i '1s/^/#Watch out you'\''re doing, there won'\''t be other confirmation.\n/' $file
|
||||
sed -i '1s/^/#Just uncomment lines you want to delete and save your file.\n/' $file
|
||||
@ -404,8 +407,6 @@ function bobarenamer {
|
||||
|
||||
sed -i '1s/^/\n/' $script
|
||||
sed -i '1s/^/\n/' $script
|
||||
sed -i '1s/^/export BORG_PASSPHRASE=\"\"\n/' $script
|
||||
sed -i '1s/^/#Quick and dirty fix for repo with passphrase\n/' $script
|
||||
sed -i '1s/^/\n/' $script
|
||||
sed -i '1s/^/#Modifications in this file will be applied\, comment all to cancel\.\n/' $script
|
||||
sed -i '1s/^/### BORG RENAMER ###\n/' $script
|
||||
|
Loading…
Reference in New Issue
Block a user