Parent Directory
|
Revision Log
*** empty log message ***
| 1 | #!/bin/sh |
| 2 | cpfile() { |
| 3 | if [ ! -f $1/$2 ]; then |
| 4 | /bin/cp $2 $1/$2 |
| 5 | fi |
| 6 | } |
| 7 | |
| 8 | md() { |
| 9 | if [ ! -d $1/$2 ]; then |
| 10 | mkdir $1/$2 |
| 11 | fi |
| 12 | } |
| 13 | |
| 14 | PRG_HOME="$1" |
| 15 | |
| 16 | md ${PRG_HOME} conf |
| 17 | md ${PRG_HOME} data |
| 18 | md ${PRG_HOME} log |
| 19 | md ${PRG_HOME}/data chicken |
| 20 | |
| 21 | for i in `find conf/ -maxdepth 1 -type f`; do |
| 22 | cpfile ${PRG_HOME} $i |
| 23 | done |
| 24 | |
| 25 | for i in `find data/ -maxdepth 1 -type f`; do |
| 26 | cpfile ${PRG_HOME} $i |
| 27 | done |
| 28 | |
| 29 | chown bbs:bbs -R ${PRG_HOME} |
| 30 | find ${PRG_HOME} -type d -exec chmod 750 {} \; |
| 31 | find ${PRG_HOME} -type f -exec chmod 640 {} \; |
| 32 | find ${PRG_HOME} -name *.php -type f -exec chmod 750 {} \; |
| 33 | chmod 4750 ${PRG_HOME}/bin/bbsd |
| 34 |
| webmaster@leafok.com | ViewVC Help |
| Powered by ViewVC 1.3.0-beta1 |