1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pelican_ynh.git synced 2024-09-03 19:46:35 +02:00
This commit is contained in:
YliesC 2017-08-13 00:22:34 +00:00
commit 5f0fa9c565

View file

@ -15,8 +15,6 @@ is_public=$YNH_APP_ARG_IS_PUBLIC
author=$YNH_APP_ARG_AUTHOR author=$YNH_APP_ARG_AUTHOR
title=$YNH_APP_ARG_TITLE title=$YNH_APP_ARG_TITLE
# Remove trailing slash to path
path=${path%/}
#force location to be / or /foo #force location to be / or /foo
location=${path:-/} location=${path:-/}
@ -27,9 +25,9 @@ sudo yunohost app checkurl $domain$path -a $app \
# Document root # Document root
document_root=/var/www/$app document_root=/var/www/$app
sudo mkdir -p $document_root sudo mkdir -p $document_root
sudo sed -i "s@https://example.fr@https://$domain@g" ../sources/publishconf.py sudo sed -i "s@YNH_APP_URL@https://$domain@g" ../sources/pelicanconf.py
sudo sed -i "s@YNH_APP_AUTHOR@$author@g" ../sources/publishconf.py sudo sed -i "s@YNH_APP_AUTHOR@$author@g" ../sources/pelicanconf.py
sudo sed -i "s@YNH_APP_SITENAME@$title@g" ../sources/publishconf.py sudo sed -i "s@YNH_APP_SITENAME@$title@g" ../sources/pelicanconf.py
sudo cp -a ../sources/* $document_root sudo cp -a ../sources/* $document_root
cd $document_root cd $document_root
@ -47,7 +45,7 @@ sudo apt-get install -y python-pip python-virtualenv python-dev libldap2-dev lib
pip install pelican markdown pip install pelican markdown
# Generate the blog # Generate the blog
pelican -s publishconf.py pelican -s pelicanconf.py
# Set permissions # Set permissions
sudo chmod 775 -R $document_root sudo chmod 775 -R $document_root