diff options
author | horchi <vdr@jwendel.de> | 2017-03-05 16:48:30 +0100 |
---|---|---|
committer | horchi <vdr@jwendel.de> | 2017-03-05 16:48:30 +0100 |
commit | bf558fd824c7ab8c794448f718b364ad403a706a (patch) | |
tree | e0ba2269c08ccc9c9bd9c336df06b1fa6fce5ec6 /scripts/fskprotect.sh | |
download | vdr-plugin-pin-bf558fd824c7ab8c794448f718b364ad403a706a.tar.gz vdr-plugin-pin-bf558fd824c7ab8c794448f718b364ad403a706a.tar.bz2 |
git init0.1.16
Diffstat (limited to 'scripts/fskprotect.sh')
-rwxr-xr-x | scripts/fskprotect.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/scripts/fskprotect.sh b/scripts/fskprotect.sh new file mode 100755 index 0000000..8e9a78b --- /dev/null +++ b/scripts/fskprotect.sh @@ -0,0 +1,34 @@ + +fskcheck check + +if [ $? != 1 ]; then + fskcheck info "Please enable pin protection first" + exit 1 +fi + +if [ "$1" == "protect" ]; then + + if [ -f $2/protection.fsk ]; then + fskcheck info "Recording was already protected!" + exit 1 + fi + + touch $2/protection.fsk + fskcheck info "Recording now protected!" + +fi + +if [ "$1" == "unprotect" ]; then + + if [ ! -f $2/protection.fsk ]; then + echo fskcheck info "Recording was not protected!" + exit 1 + fi + + rm -f $2/protection.fsk + fskcheck info "Removed protection of recording!" + +fi + +exit 0 + |