1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/bozon_ynh.git synced 2024-09-03 18:16:09 +02:00
bozon_ynh/scripts/upgrade

29 lines
762 B
Text
Raw Normal View History

2016-03-23 19:30:43 +01:00
#! /bin/bash
app=bozon
2016-04-04 20:01:54 +02:00
parent_path=/var/www
final_path=$parent_path/$app
2016-03-23 19:30:43 +01:00
#retrieve arguments
path=$(sudo yunohost app setting $app path)
2016-04-04 20:01:54 +02:00
# Download bozon
cd $parent_path
sudo wget https://github.com/broncowdd/BoZoN/archive/master.zip
sudo unzip master.zip
sudo rm master.zip
sudo mv BoZoN-master $app
2016-03-23 19:30:43 +01:00
2016-04-04 20:01:54 +02:00
# Copy files to final folder and set permissions
2016-03-23 19:30:43 +01:00
sudo find $final_path -type f -name ".htaccess" | xargs sudo rm
sudo chown -R root: $final_path
2016-04-04 20:01:54 +02:00
sudo find $final_path -type f | xargs sudo chmod 644
sudo find $final_path -type d | xargs sudo chmod 755
2016-03-25 09:49:10 +01:00
sudo chown -R www-data: $final_path/private
sudo chown -R www-data: $final_path/uploads
sudo chown -R www-data: $final_path/thumbs
2016-03-23 19:30:43 +01:00
# Restart services
sudo service nginx reload
sudo yunohost app ssowatconf