dmesgdb

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

comment (415B)


      1 #!/bin/sh
      2 . /var/common.sh
      3 
      4 get_param token
      5 
      6 [ "$token" = "Unknown" ] && fail
      7 
      8 HD="$DB/$token"
      9 
     10 [ -e "$HD" ] && {
     11 	get_param comment
     12 	[ "$comment" = "Unknown" ] && fail "ERROR: no comment"
     13 	[ ${#comment} -gt 128 ] && fail "too much comment size (need <= 128 bytes)"
     14 	echo -en "$comment" > "$HD/comment"
     15 }
     16 echo -en "Content-type: text/html\r\n\r\n"
     17 echo "Ok"
     18 echo "Your comment: '$comment' has been accepted"
     19 exit 0