-
Notifications
You must be signed in to change notification settings - Fork 21
/
moni-install.in
executable file
·43 lines (36 loc) · 1022 Bytes
/
moni-install.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
echo
echo "+------------------------------------+"
echo "| MoniWiki installation script |"
echo "+------------------------------------+"
echo
if [ -z $INSTDIR ]; then
INSTDIR=@@INSTDIR@@
fi
if [ -z $MAIN ]; then
MAIN=wiki.php
fi
DATAFILES="intermap.txt
mime.types
PeignotNum.ttf
"
LINKS="imgs images theme css local locale plugin lib applets"
for x in LINKS; do
[ ! -d $x ] && [ -d $INSTDIR/$x ] && ln -s $INSTDIR/$x .
done
#[ ! -d data ] && cp -a $INSTDIR/data .
[ ! -d data ] && mkdir data && (cd data; for x in $DATAFILES; do ln -s $INSTDIR/data/$x .; done)
[ ! -d config ] && mkdir config && cp -a $INSTDIR/config/* config/
[ ! -f config.php.default ] && ln -s $INSTDIR/config.php.default .
[ ! -f monisetup.php ] && ln -s $INSTDIR/monisetup.php .
conf=`ls $INSTDIR/config.php.*|grep -v config.php.default`
cp -a $INSTDIR/monisetup.sh $INSTDIR/secure.sh .
if [ -n "$conf" ]; then
cp -a $conf .
fi
if [ ! -f index.php ]; then
cat <<PHP >index.php
<?php
include("$INSTDIR/$MAIN");
PHP
fi