3 cd "$(dirname "$(readlink -f "$0")")"
6 if [ -n "$KEY_DIR" ]; then
7 if [ -O "$KEY_DIR" ]; then
8 chmod go-rwx "$KEY_DIR"
9 if [ ! -e "$KEY_DIR/index.txt
" ]; then
10 echo "Building index.txt
"
11 touch "$KEY_DIR/index.txt
"
13 if [ ! -e "$KEY_DIR/index.txt.attr
" ]; then
14 echo "Building index.txt.attr
"
15 echo "unique_subject
= no
" >"$KEY_DIR/index.txt.attr
"
17 if [ ! -e "$KEY_DIR/serial
" ]; then
18 echo "Building serial
"
19 echo 01 >"$KEY_DIR/serial
"
21 if [ ! -e "$KEY_DIR/ca.crt
" -a ! -e "$KEY_DIR/ca.key
" ]; then
26 echo "The key dir
'$KEY_DIR' isn
't owned by the right user ($USER)"
29 echo 'Make sure you have edited easy
-rsa/vars to reflect your configuration.
'