Last active
July 26, 2024 01:58
-
-
Save anoduck/56b550bb5a22f73df046aafa5886e292 to your computer and use it in GitHub Desktop.
transformed commands from ivre documentation into a shell script to run.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [ "$EUID" -ne 0 ] | |
then echo "You must run this with root permissions." | |
exit | |
fi | |
cd /var/www/html || exit | |
rm index.html | |
ln -s /usr/share/ivre/web/static/* . | |
cd /var/lib/dokuwiki/data/pages || exit | |
ln -s /usr/share/ivre/dokuwiki/doc . | |
cd /var/lib/dokuwiki/data/media || exit | |
ln -s /usr/share/ivre/dokuwiki/media/logo.png . | |
ln -s /usr/share/ivre/dokuwiki/media/doc . | |
cd /usr/share/dokuwiki || exit | |
patch -p0 < /usr/share/ivre/patches/dokuwiki/backlinks-20200729.patch | |
cd /etc/apache2/mods-enabled || . | |
for m in rewrite.load wsgi.conf wsgi.load ; do | |
[ -L $m ] || ln -s ../mods-available/$m ; | |
done | |
cd ../ | |
cat << EOF >> conf-enabled/ivre.conf | |
Alias /cgi "/usr/share/ivre/web/wsgi/app.wsgi" | |
<Location /cgi>\n wsgi-script | |
Options +ExecCGI | |
Require all granted | |
</Location> | |
EOF | |
sed -i 's/^\(\s*\)#Rewrite/\1Rewrite/' /etc/dokuwiki/apache.conf | |
echo 'WEB_GET_NOTEPAD_PAGES = "localdokuwiki"' >> /etc/ivre.conf | |
service apache2 start ## or start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Although a good idea in theory, it's application in Kali Linux was less than fruitful. Here why:
/usr/local/share/ivre/dokuwiki
, but in/usr/share/ivre/dokuwiki
.