Debuged stenc(added sudo) ; improved help page

This commit is contained in:
Erik Foris 2021-01-06 20:26:43 +00:00
parent 8d6e755be5
commit 688ccfa54d

View File

@ -2,6 +2,8 @@
if [ "$1" = "-h" ]
then
echo
echo
echo "do-plication <option> <enable/disable Encryprion> <n> [directory to back up] [path to key file] [ key file descriptoin(only if key not alreadey created) ]"
echo
echo "Options:"
@ -15,6 +17,8 @@ if [ "$1" = "-h" ]
echo "Enable/Disable Encryprion"
echo "-e Encrypt "
echo "-n noEncrypt"
echo
echo
exit 0
fi
@ -24,11 +28,11 @@ if [ "$2" = "-e" ]
if [$? -gt 0]
then
echo "key not fount creating key"
stenc -g 256 -k "$5" -kd "$6";
stenc -f /dev/nst0 -e on -k "$5" -a 1 --ckod
sudo stenc -g 256 -k "$5" -kd "$6";
sudo stenc -f /dev/nst0 -e on -k "$5" -a 1 --ckod
else
echo "key fount using key"
stenc -f /dev/nst0 -e on -k "$5" -a 1 --ckod
sudo stenc -f /dev/nst0 -e on -k "$5" -a 1 --ckod
fi
fi