mirror of
https://github.com/YunoHost-Apps/tinyfilemanager_ynh.git
synced 2024-09-03 20:36:01 +02:00
cleaning
This commit is contained in:
parent
0804ce0c87
commit
64db2f6f83
6 changed files with 22 additions and 58 deletions
|
@ -18,7 +18,7 @@ userdoc = "https://github.com/prasathmani/tinyfilemanager"
|
|||
code = "https://github.com/prasathmani/tinyfilemanager"
|
||||
|
||||
[integration]
|
||||
yunohost = ">= 11.2.18"
|
||||
yunohost = ">= 11.2.29"
|
||||
helpers_version = "2.1"
|
||||
architectures = "all"
|
||||
multi_instance = true
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
|
@ -19,15 +18,11 @@ ynh_backup "$install_dir"
|
|||
ynh_backup "$data_dir"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
# SYSTEM CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -10,41 +10,31 @@ ynh_app_setting_set --key=php_upload_max_filesize --value=10G
|
|||
#=================================================
|
||||
|
||||
timezone="$(cat /etc/timezone)"
|
||||
# passhash=php hash.php $password
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
ynh_script_progression "Setting up source files..."
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
|
||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
|
||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir"
|
||||
# rename tinyfilemanager to index
|
||||
mv $install_dir/tinyfilemanager.php $install_dir/index.php
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
# APP INITIAL CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression "Configuring PHP-FPM..."
|
||||
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_config_add_phpfpm
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_config_add_nginx
|
||||
|
||||
#=================================================
|
||||
# ADD A CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression "Adding $app's configuration..."
|
||||
ynh_script_progression "Adding $app's configuration files..."
|
||||
|
||||
ynh_config_add --template="config.php" --destination="$install_dir/config.php"
|
||||
|
||||
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 600 "$install_dir/config.php"
|
||||
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app:$app "$install_dir/config.php"
|
||||
#=================================================
|
||||
# SYSTEM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression "Adding system configurations related to $app..."
|
||||
|
||||
ynh_config_add_phpfpm
|
||||
|
||||
ynh_config_add_nginx
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -4,14 +4,12 @@ source _common.sh
|
|||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# REMOVE NGINX CONFIGURATION
|
||||
# REMOVE SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
ynh_script_progression "Removing NGINX web server configuration..."
|
||||
ynh_script_progression "Removing system configurations related to $app..."
|
||||
|
||||
# Remove the dedicated NGINX config
|
||||
ynh_config_remove_nginx
|
||||
|
||||
# Remove the dedicated PHP-FPM config
|
||||
ynh_config_remove_phpfpm
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -11,8 +11,6 @@ ynh_script_progression "Restoring the app main directory..."
|
|||
|
||||
ynh_restore "$install_dir"
|
||||
|
||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
|
||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir"
|
||||
#=================================================
|
||||
# RESTORE THE DATA DIRECTORY
|
||||
#=================================================
|
||||
|
@ -23,9 +21,9 @@ ynh_restore "$data_dir"
|
|||
chown -R $app:www-data "$data_dir"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
# RESTORE SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
ynh_script_progression "Restoring the PHP-FPM configuration..."
|
||||
ynh_script_progression "Restoring system configurations related to $app..."
|
||||
|
||||
ynh_restore "/etc/php/$php_version/fpm/pool.d/$app.conf"
|
||||
|
||||
|
|
|
@ -14,42 +14,25 @@ timezone="$(cat /etc/timezone)"
|
|||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
ynh_script_progression "Upgrading source files..."
|
||||
|
||||
# FIXME: this is still supported but the recommendation is now to *always* re-setup the app sources wether or not the upstream sources changed
|
||||
if ynh_app_upstream_version_changed
|
||||
then
|
||||
ynh_script_progression "Upgrading source files..."
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
fi
|
||||
|
||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
|
||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir"
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
# REAPPLY SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
ynh_script_progression "Upgrading PHP-FPM configuration..."
|
||||
ynh_script_progression "Upgrading system configurations related to $app..."
|
||||
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_config_add_phpfpm
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression "Upgrading NGINX web server configuration..."
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_config_add_nginx
|
||||
|
||||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression "Updating configuration..."
|
||||
ynh_config_add --template="config.php" --destination="$install_dir/config.php"
|
||||
ynh_script_progression "Updating $app's configuration files..."
|
||||
|
||||
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 600 "$install_dir/config.php"
|
||||
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app:$app "$install_dir/config.php"
|
||||
ynh_config_add --template="config.php" --destination="$install_dir/config.php"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
Loading…
Add table
Reference in a new issue