coffin

secure lan file storage on a device
git clone git://parazyd.org/coffin.git
Log | Files | Refs | Submodules | README | LICENSE

commit eb0887883e8ef68dd3e6f1ed47616e3a8db5498b
parent 2d6832d313116920729fbb7bd45ca7a37fbb38a7
Author: parazyd <parazyd@dyne.org>
Date:   Wed, 13 Apr 2016 14:37:58 +0200

delete option

Diffstat:
Mhelpers/makehook | 17+++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/helpers/makehook b/helpers/makehook @@ -6,7 +6,7 @@ hooks="hook" davfile="davpasswd" - +ttab="ttab" system=`uname -o` gendav() { @@ -18,7 +18,7 @@ gendav() { elif [[ $system == "Darwin" ]]; then daventry=`echo -n "${undertaker}:WebDAV:" \ && echo -n "${undertaker}:WebDAV:${davpass}" \ - | md5 \ + | md5 \ | awk '{print $NF}'` fi } @@ -126,6 +126,19 @@ happenz() { 4) echo -e "\n" echo "Toggling state..." + + read -p "Please input the name of the tomb you wish to toggle: " + re='^[A-Za-z0-9]+$' + [[ $tombname =~ $re ]] || { + echo "ERROR: Invalid characters in tomb name." + exec $0 + } + [[ `grep $tombname $ttab` ]] || { + echo "ERROR: No tomb of that name." + exec $0 + } + + # TODO: make pattern recognition, sed or awk ;; *) echo -e "\n"