tikiwiki/entrypoint.sh

41 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
set -e
echo "Starting Tikiwiki"
install() {
echo "Install"
sudo -u tikiwiki php console.php database:configure --host $MYSQL_HOST $MYSQL_USER $MYSQL_PASSWORD $MYSQL_DATABASE
sudo -u tikiwiki php console.php database:install
sudo -u tikiwiki php console.php installer:lock
install_packages
update
}
install_packages() {
sudo -u tikiwiki php console.php package:install TikiManager
sudo -u tikiwiki php console.php package:install PDFjsViewer
sudo -u tikiwiki php console.php package:install MediaAlchemyst
sudo -u tikiwiki php console.php package:install diagram
sudo -u tikiwiki php console.php package:install mPDF
sudo -u tikiwiki php console.php package:install Lozad
sudo -u tikiwiki php console.php package:install FakerPHP
sudo -u tikiwiki php console.php package:install Expose
sudo -u tikiwiki php console.php package:install CasperJS
sudo -u tikiwiki php console.php package:install PhpReadability
sudo -u tikiwiki php console.php package:install WebODF
sudo -u tikiwiki php console.php package:install TesseractOCR
sudo -u tikiwiki php console.php package:install FullCalendarScheduler
}
update() {
echo "Update"
sudo -u tikiwiki php console.php database:update
sudo -u tikiwiki php console.php package:update
}
[ -s ./db/local.php ] && update || install
exec $@