summaryrefslogtreecommitdiff
path: root/scripts/fskprotect.sh
blob: 8e9a78bb8c60ac0d2d51515fbc5730d410d6b518 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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