Mercurial > hgrepos > hgweb.cgi > s4
comparison s4-start.sh @ 541:4f66dc71ad2a
Default password rule fixed
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sat, 06 Apr 2019 19:20:45 +0900 |
parents | 1c784b64d9f0 |
children | 10803d78f07c |
comparison
equal
deleted
inserted
replaced
540:b61881cfe57f | 541:4f66dc71ad2a |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 # 愛 | 2 # 愛 |
3 # Start s4 - Generate s4.cgi | 3 # Start s4 - Generate s4.cgi |
4 mydir=`dirname $0` | 4 mydir=`dirname $0` |
5 myname=`basename $0` | 5 myname=`basename $0` |
6 $dpsuffix="password" | 6 dp="password" |
7 # Default password: "$dpsuffix of $ADMIN" | 7 # Default password: "$dp of $ADMIN" |
8 | 8 |
9 script_dir=${SCRIPT_DIR:-scripts} | 9 script_dir=${SCRIPT_DIR:-scripts} |
10 | 10 |
11 ADMIN="" | 11 ADMIN="" |
12 TYPE="form1" | 12 TYPE="form1" |
98 (echo "ADMIN=$ADMIN" | 98 (echo "ADMIN=$ADMIN" |
99 echo "S4TYPE=$TYPE" | 99 echo "S4TYPE=$TYPE" |
100 [ "$guest" ] && echo "guestonlymode=1") >> s4-config.sh | 100 [ "$guest" ] && echo "guestonlymode=1") >> s4-config.sh |
101 sqlite3 -cmd "pragma FOREIGH_KEYS=ON" $db \ | 101 sqlite3 -cmd "pragma FOREIGH_KEYS=ON" $db \ |
102 "REPLACE INTO user VALUES('$ADMIN');" | 102 "REPLACE INTO user VALUES('$ADMIN');" |
103 dbsetbyid user "$ADMIN" pswd "`echo $dpsuffix of $ADMIN|mypwhash`" | 103 dbsetbyid user "$ADMIN" pswd "`echo $dp of $ADMIN|mypwhash`" |
104 cat > .htaccess <<-EOF | 104 cat > .htaccess <<-EOF |
105 DirectoryIndex index.cgi | 105 DirectoryIndex index.cgi |
106 AddHandler cgi-script .cgi | 106 AddHandler cgi-script .cgi |
107 EOF | 107 EOF |
108 if [ -n "$wrap" ]; then | 108 if [ -n "$wrap" ]; then |