dokuwiki-customizations/install.sh

30 lines
762 B
Bash
Executable File

#!/bin/bash
set -e
if [ "$DOKUWIKI_CUSTOM" == "" ]; then
DOKUWIKI_CUSTOM="/usr/share/dokuwiki/conf/"
fi
if [ "$DOKUWIKI_CUSTOM_LOGO" == "" ]; then
DOKUWIKI_CUSTOM_LOGO="/usr/share/dokuwiki/data/media/wiki"
fi
echo ""
echo "Customizations will be installed into $DOKUWIKI_CUSTOM"
echo "and logo and favicon into $DOKUWIKI_CUSTOM_LOGO"
echo "(define DOKUWIKI_CUSTOM or DOKUWIKI_CUSTOM_LOGO env to change it)"
echo ""
read -p "Continue (y/N)?" confirm
case "$confirm" in
y|Y ) echo "yes";;
* ) exit 1;;
esac
mkdir -p "$DOKUWIKI_CUSTOM"
cp -r -v -f ./custom/* "$DOKUWIKI_CUSTOM"
chown www-data:www-data $DOKUWIKI_CUSTOM/*
mkdir -p "$DOKUWIKI_CUSTOM_LOGO"
cp -r -v -f ./logo/* "$DOKUWIKI_CUSTOM_LOGO"
chown www-data:www-data $DOKUWIKI_CUSTOM_LOGO/*