Bläddra i källkod

Use the debian dokuwiki package

Bob Mottram 10 år sedan
förälder
incheckning
847336da89
1 ändrade filer med 5 tillägg och 33 borttagningar
  1. 5
    33
      install-freedombone.sh

+ 5
- 33
install-freedombone.sh Visa fil

@@ -162,10 +162,8 @@ OWNCLOUD_FREEDNS_SUBDOMAIN_CODE=
162 162
 
163 163
 # Domain name or freedns subdomain for your wiki
164 164
 WIKI_DOMAIN_NAME=
165
+# Freedns dynamic dns code for the wiki
165 166
 WIKI_FREEDNS_SUBDOMAIN_CODE=
166
-WIKI_ARCHIVE="dokuwiki-stable.tgz"
167
-WIKI_DOWNLOAD="http://download.dokuwiki.org/src/dokuwiki/$WIKI_ARCHIVE"
168
-WIKI_HASH="941b6954d39de57530efbb27d0734b6bc9a49aaa3c781b39f6ecb305322534eb"
169 167
 
170 168
 # see https://www.dokuwiki.org/template:mnml-blog
171 169
 # https://andreashaerter.com/tmp/downloads/dokuwiki-template-mnml-blog/CHECKSUMS.asc
@@ -3227,45 +3225,19 @@ function install_wiki {
3227 3225
   if [ ! $WIKI_DOMAIN_NAME ]; then
3228 3226
       return
3229 3227
   fi
3230
-  apt-get -y --force-yes install php5 php5-gd php-xml-parser php5-intl wget
3231
-  apt-get -y --force-yes install php5-sqlite php5-mysql smbclient curl libcurl3 php5-curl bzip2
3228
+  apt-get -y --force-yes instal dokuwiki
3232 3229
 
3233 3230
   if [ ! -d /var/www/$WIKI_DOMAIN_NAME ]; then
3234 3231
       mkdir /var/www/$WIKI_DOMAIN_NAME
3235 3232
   fi
3236
-  if [ ! -d /var/www/$WIKI_DOMAIN_NAME/htdocs ]; then
3237
-      mkdir /var/www/$WIKI_DOMAIN_NAME/htdocs
3233
+  if [ -d /var/www/$WIKI_DOMAIN_NAME/htdocs ]; then
3234
+      rm -rf /var/www/$WIKI_DOMAIN_NAME/htdocs
3238 3235
   fi
3239
-
3240 3236
   if [ ! -f /etc/ssl/private/$WIKI_DOMAIN_NAME.key ]; then
3241 3237
       makecert $WIKI_DOMAIN_NAME
3242 3238
   fi
3243 3239
 
3244
-  # download the archive
3245
-  cd $INSTALL_DIR
3246
-  if [ ! -f $INSTALL_DIR/$WIKI_ARCHIVE ]; then
3247
-      wget $WIKI_DOWNLOAD
3248
-  fi
3249
-  if [ ! -f $INSTALL_DIR/$WIKI_ARCHIVE ]; then
3250
-      echo 'Dokuwiki could not be downloaded.  Check that it exists at '
3251
-      echo $WIKI_DOWNLOAD
3252
-      echo 'And if neccessary update the version number and hash within this script'
3253
-      exit 18
3254
-  fi
3255
-  # Check that the hash is correct
3256
-  CHECKSUM=$(sha256sum $WIKI_ARCHIVE | awk -F ' ' '{print $1}')
3257
-  if [[ $CHECKSUM != $WIKI_HASH ]]; then
3258
-      echo 'The sha256 hash of the Dokuwiki download is incorrect. Possibly the file may have been tampered with. Check the hash on the Dokuwiki web site.'
3259
-      echo $CHECKSUM
3260
-      echo $WIKI_HASH
3261
-      exit 21
3262
-  fi
3263
-
3264
-  tar -xzvf $WIKI_ARCHIVE
3265
-  cd dokuwiki-*
3266
-  mv * /var/www/$WIKI_DOMAIN_NAME/htdocs/
3267
-  chmod -R 755 /var/www/$WIKI_DOMAIN_NAME/htdocs
3268
-  chown -R www-data:www-data /var/www/$WIKI_DOMAIN_NAME/htdocs
3240
+  ln -s /usr/share/dokuwiki /var/www/$WIKI_DOMAIN_NAME/htdocs
3269 3241
 
3270 3242
   if ! grep -q "video/ogg" /var/www/$WIKI_DOMAIN_NAME/htdocs/conf/mime.conf; then
3271 3243
       echo 'ogv     video/ogg' >> /var/www/$WIKI_DOMAIN_NAME/htdocs/conf/mime.conf