forked from EsKuel/leed_ynh
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Maniack Crudelis
committed
Nov 22, 2015
1 parent
260ddda
commit c519126
Showing
53 changed files
with
602 additions
and
26,049 deletions.
There are no files selected for viewing
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
; upload_max_filesize=100M | ||
; post_max_size=100M | ||
; max_execution_time=60 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
# Récupère les infos de l'application. | ||
app=leed | ||
final_path=$(sudo yunohost app setting $app final_path) | ||
domain=$(sudo yunohost app setting $app domain) | ||
|
||
|
||
# The parameter $1 is the backup directory location | ||
# which will be compressed afterward | ||
backup_dir=$1/apps/$app | ||
sudo mkdir -p "$backup_dir" | ||
|
||
# Backup sources & data | ||
sudo cp -a $final_path/. $backup_dir/sources | ||
|
||
# Copy Nginx and YunoHost parameters to make the script "standalone" | ||
sudo cp -a /etc/yunohost/apps/$app/. $backup_dir/yunohost | ||
sudo cp -a /etc/nginx/conf.d/$domain.d/$app.conf $backup_dir/nginx.conf | ||
|
||
# Copy dedicated php-fpm process to backup folder | ||
sudo cp -a /etc/php5/fpm/pool.d/$app.conf $backup_dir/php-fpm.conf | ||
sudo cp -a /etc/php5/fpm/conf.d/20-$app.ini $backup_dir/php-fpm.ini |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,30 @@ | ||
#!/bin/bash | ||
|
||
db_user=leed | ||
db_name=leed | ||
app=leed | ||
|
||
# Récupère les infos de l'application. | ||
root_pwd=$(sudo cat /etc/yunohost/mysql) | ||
domain=$(sudo yunohost app setting leed domain) | ||
admin=$(sudo yunohost app setting leed admin) | ||
path=$(sudo yunohost app setting leed path) | ||
|
||
# Suppression de la base de donnée et son user | ||
mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;" | ||
# Suppression du dossier | ||
sudo rm -rf /var/www/leed | ||
domain=$(sudo yunohost app setting $app domain) | ||
|
||
# Utilise '$app' comme nom d'utilisateur et de base de donnée | ||
db_user=$app | ||
mysql -u root -p$root_pwd -e "DROP DATABASE $db_user ; DROP USER $db_user@localhost ;" | ||
|
||
# Suppression du dossier de l'application | ||
sudo rm -rf /var/www/$app | ||
|
||
# Suppression de la configuration nginx | ||
sudo rm -f /etc/nginx/conf.d/$domain.d/leed.conf | ||
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf | ||
|
||
# Retirer le cron | ||
sudo rm -f /etc/cron.d/leed | ||
sudo rm -f /etc/cron.d/$app | ||
|
||
# Suppression de la configuration du pool php-fpm | ||
sudo rm -f /etc/php5/fpm/pool.d/$app.conf | ||
sudo rm -f /etc/php5/fpm/conf.d/20-$app.ini | ||
|
||
# Reload Nginx and regenerate SSOwat conf | ||
# Recharge la configuration Nginx et php5-fpm | ||
sudo service nginx reload | ||
# sudo service php5-fpm reload | ||
# Régénère la configuration de SSOwat | ||
sudo yunohost app ssowatconf |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
# Récupère les infos de l'application. | ||
app=leed | ||
final_path=$(sudo yunohost app setting $app final_path) | ||
domain=$(sudo yunohost app setting $app domain) | ||
|
||
# The parameter $1 is the uncompressed restore directory location | ||
backup_dir=$1/apps/$app | ||
|
||
# Restore sources & data | ||
sudo cp -a $backup_dir/sources/. $final_path | ||
|
||
# Restore Nginx and YunoHost parameters | ||
sudo cp -a $backup_dir/yunohost/. /etc/yunohost/apps/$app | ||
sudo cp -a $backup_dir/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf | ||
|
||
# Copy dedicated php-fpm process from backup folder to the right location | ||
sudo cp -a $backup_dir/php-fpm.conf /etc/php5/fpm/pool.d/$app.conf | ||
sudo cp -a $backup_dir/php-fpm.ini /etc/php5/fpm/conf.d/20-$app.ini | ||
# And restart service | ||
sudo service php5-fpm reload | ||
|
||
# Restart webserver | ||
sudo service nginx reload |
Oops, something went wrong.