mirror of
https://github.com/YunoHost-Apps/pelican_ynh.git
synced 2024-09-03 19:46:35 +02:00
Update install
This commit is contained in:
parent
5d5570c674
commit
24364b7a94
1 changed files with 5 additions and 6 deletions
|
@ -31,7 +31,10 @@ sudo sed -i "s@YNH_APP_SITENAME@$title@g" ../sources/pelicanconf.py
|
||||||
sudo sed -i "s@YNH_APP_AUTHOR@$author@g" ../sources/content/first-article.md
|
sudo sed -i "s@YNH_APP_AUTHOR@$author@g" ../sources/content/first-article.md
|
||||||
sudo cp -a ../sources/* $document_root
|
sudo cp -a ../sources/* $document_root
|
||||||
|
|
||||||
cd $document_root
|
# Nginx configuration
|
||||||
|
sed -i "s@YNH_LOCATION@$location@g" ../conf/nginx.conf
|
||||||
|
sed -i "s@YNH_DOCUMENT_ROOT@$document_root/@g" ../conf/nginx.conf
|
||||||
|
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
|
|
||||||
# Store settings from manifest
|
# Store settings from manifest
|
||||||
ynh_app_setting_set $app domain $domain
|
ynh_app_setting_set $app domain $domain
|
||||||
|
@ -46,17 +49,13 @@ 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
|
||||||
|
cd $document_root
|
||||||
pelican -s pelicanconf.py
|
pelican -s pelicanconf.py
|
||||||
|
|
||||||
# Set permissions
|
# Set permissions
|
||||||
sudo chmod 775 -R $document_root
|
sudo chmod 775 -R $document_root
|
||||||
sudo chown -hR www-data:www-data $document_root
|
sudo chown -hR www-data:www-data $document_root
|
||||||
|
|
||||||
# Nginx configuration
|
|
||||||
sed -i "s@YNH_LOCATION@$location@g" ../conf/nginx.conf
|
|
||||||
sed -i "s@YNH_DOCUMENT_ROOT@$document_root/@g" ../conf/nginx.conf
|
|
||||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
|
||||||
|
|
||||||
# Make app public if necessary
|
# Make app public if necessary
|
||||||
[[ $is_public -eq 1 ]] \
|
[[ $is_public -eq 1 ]] \
|
||||||
&& ynh_app_setting_set "$app" unprotected_uris "/"
|
&& ynh_app_setting_set "$app" unprotected_uris "/"
|
||||||
|
|
Loading…
Add table
Reference in a new issue