2012-07-21 | Paul Boddie | file changeset files shortlog | Restructured the action so that both signed and signed/encrypted messages can be processed. Split the posting test program into separate signing, encryption and posting programs. Added a default mask command to the initialisation script. |
paul@4 | 1 | #!/bin/sh |
paul@4 | 2 | |
paul@4 | 3 | WIKI=$1 |
paul@4 | 4 | USER=$2 |
paul@4 | 5 | |
paul@4 | 6 | if [ ! "$WIKI" ]; then |
paul@4 | 7 | echo "Please specify a Wiki directory." 1>&2 |
paul@4 | 8 | exit 1 |
paul@4 | 9 | fi |
paul@4 | 10 | |
paul@4 | 11 | if [ ! "$USER" ]; then |
paul@4 | 12 | echo "Please specify a Web username." 1>&2 |
paul@4 | 13 | exit 1 |
paul@4 | 14 | fi |
paul@4 | 15 | |
paul@4 | 16 | # Initialise and configure ACLs on the gpg "homedir". |
paul@4 | 17 | |
paul@4 | 18 | mkdir $WIKI/gnupg |
paul@4 | 19 | chmod go-rwx $WIKI/gnupg |
paul@4 | 20 | setfacl -m u:$USER:rwx $WIKI/gnupg |
paul@4 | 21 | setfacl -m m:rwx $WIKI/gnupg |
paul@4 | 22 | setfacl -m d:u:$USER:rwx $WIKI/gnupg |
paul@5 | 23 | setfacl -m d:m:rwx $WIKI/gnupg |