mirror of
https://github.com/YunoHost-Apps/bozon_ynh.git
synced 2024-09-03 18:16:09 +02:00
28 lines
762 B
Bash
28 lines
762 B
Bash
#! /bin/bash
|
|
|
|
app=bozon
|
|
parent_path=/var/www
|
|
final_path=$parent_path/$app
|
|
|
|
#retrieve arguments
|
|
path=$(sudo yunohost app setting $app path)
|
|
|
|
# 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
|
|
|
|
# Copy files to final folder and set permissions
|
|
sudo find $final_path -type f -name ".htaccess" | xargs sudo rm
|
|
sudo chown -R root: $final_path
|
|
sudo find $final_path -type f | xargs sudo chmod 644
|
|
sudo find $final_path -type d | xargs sudo chmod 755
|
|
sudo chown -R www-data: $final_path/private
|
|
sudo chown -R www-data: $final_path/uploads
|
|
sudo chown -R www-data: $final_path/thumbs
|
|
|
|
# Restart services
|
|
sudo service nginx reload
|
|
sudo yunohost app ssowatconf
|