mirror of
https://github.com/YunoHost-Apps/joomla_ynh.git
synced 2024-09-03 19:26:34 +02:00
typo in nginx.conf and updated restore script
This commit is contained in:
parent
94de7e4bfb
commit
d2605a927d
2 changed files with 9 additions and 53 deletions
|
@ -1,6 +1,10 @@
|
|||
location __PATH__ {
|
||||
alias __FINALPATH__/;
|
||||
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
# Default indexes and catch-all
|
||||
index index.html index.php;
|
||||
try_files $uri $uri/ __PATH__/index.php?$args;
|
||||
|
@ -24,7 +28,7 @@ location __PATH__ {
|
|||
# Execute and serve PHP files
|
||||
location ~ [^/]\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
fastcgi_pass unix:/var/run/php5-fpm-my_webapp__11.sock;
|
||||
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param REMOTE_USER $remote_user;
|
||||
|
|
|
@ -55,6 +55,10 @@ ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
|
||||
ynh_restore_file "$final_path"
|
||||
|
||||
# Set permissions to app files (requires 774 for folder permissions)
|
||||
#**********NEEDED TO BE CHECKED*********
|
||||
sudo find $final_path -type f | xargs chmod 774
|
||||
sudo find $final_path -type d | xargs chmod 774
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
|
@ -67,59 +71,7 @@ ynh_mysql_connect_as $db_name $db_pwd $db_name < ./db.sql
|
|||
# RECREATE THE DEDICATED USER
|
||||
#=================================================
|
||||
|
||||
# Create the dedicated user (if not existing)
|
||||
ynh_system_user_create $app
|
||||
|
||||
#=================================================
|
||||
# RESTORE USER RIGHTS
|
||||
#=================================================
|
||||
|
||||
# Restore permissions on app files
|
||||
sudo chown -R root: $final_path
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_restore_file "/etc/php5/fpm/pool.d/$app.conf"
|
||||
ynh_restore_file "/etc/php5/fpm/conf.d/20-$app.ini"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
|
||||
# Define and install dependencies
|
||||
ynh_install_app_dependencies deb1 deb2
|
||||
|
||||
#=================================================
|
||||
# ADVERTISE SERVICE IN ADMIN PANEL
|
||||
#=================================================
|
||||
|
||||
sudo yunohost service add $app --log "/var/log/$app/APP.log"
|
||||
|
||||
#=================================================
|
||||
# RESTORE SYSTEMD
|
||||
#=================================================
|
||||
|
||||
ynh_restore_file "/etc/systemd/system/$app.service"
|
||||
sudo systemctl enable $app.service
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE CRON FILE
|
||||
#=================================================
|
||||
|
||||
ynh_restore_file "/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE LOGROTATE CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_restore_file "/etc/logrotate.d/$app"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# RELOAD NGINX AND PHP-FPM
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue