403Webshell
Server IP : 104.129.129.72  /  Your IP : 216.73.216.229
Web Server : LiteSpeed
System : Linux 123answers 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64
User : answe8064 ( 1002)
PHP Version : 8.2.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /opt/installer/apps/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/installer/apps/dokuwiki-latest-offisrc-nginx
#!/bin/bash

if [ -f "include/startup.sh" ]; then
    . include/startup.sh
elif [ -f "../include/startup.sh" ]; then
    . ../include/startup.sh
fi

checkTagExist nginx.success
checkTagExist php.success
checkTagExist nginx-enable-php-ssl.success

appPath=/var/www/html
rootDir=$(rootDir)

echo "Installing DokuWiki" | log

echo "Downloading DokuWiki from original repo" | log
cd $rootDir/temp
curlDownload https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
waitOrStop 0 "File not downloaded from official sources"

mkdir -p $appPath
mv dokuwiki-stable.tgz $appPath

echo "Extracting DokuWiki to ${appPath}/" | log
tar -xzvf $appPath/dokuwiki-stable.tgz -C $appPath/ --strip 1
waitOrStop 0 "Failed to extract application archive"
rm -f $appPath/dokuwiki-stable.tgz

echo "Setting directory permissions" | log
chown -R www-data.www-data $appPath/data/
chown -R www-data.www-data $appPath/conf/
chown -R www-data.www-data $appPath/inc/
chmod 0700  $appPath/data/
chmod 0700  $appPath/conf/
chmod 0700  $appPath/inc/

echo "Creating nginx configuration" | log
#copy configs to nginx folder
cp $rootDir/tweaks/extras/dokuwiki-nginx/dokuwiki.conf /etc/nginx/sites-available/
# Symlink DokuWiki vhost
ln -s /etc/nginx/sites-available/dokuwiki.conf /etc/nginx/sites-enabled/
# Remove default vhosts
unlink /etc/nginx/sites-enabled/default
unlink /etc/nginx/sites-enabled/default-ssl
systemctl restart nginx
waitOrStop 0 "Restart nginx service failed"

echo "Creating Welcome Message" | log
cat << EOF > ${appPath}/data/pages/start.txt
====== You are almost done ======


Please proceed to [[https://${CWM_DISPLAYED_ADDRESS}/install.php|this link]] for additional configuration
EOF
chown www-data:www-data $appPath/data/pages/start.txt

echo "Adding descriptions" | log
descriptionAppend "DokuWiki Web UI: https://${CWM_DISPLAYED_ADDRESS}"
descriptionAppend " "

tagScript success

exit 0

Youez - 2016 - github.com/yon3zu
LinuXploit