Browse Source

No source, no final path anymoar

Alexandre Aubin 3 years ago
parent
commit
52ff5dbfd9
5 changed files with 1 additions and 43 deletions
  1. 0 4
      scripts/backup
  2. 0 2
      scripts/config
  3. 0 12
      scripts/install
  4. 1 24
      scripts/restore
  5. 0 1
      scripts/upgrade

+ 0 - 4
scripts/backup

@@ -23,8 +23,6 @@ ynh_print_info "Loading installation settings..."
 
 app=$YNH_APP_INSTANCE_NAME
 
-final_path=$(ynh_app_setting_get $app final_path)
-
 #=================================================
 # STANDARD BACKUP STEPS
 #=================================================
@@ -32,8 +30,6 @@ final_path=$(ynh_app_setting_get $app final_path)
 #=================================================
 ynh_print_info "Backing up the main app directory..."
 
-ynh_backup "$final_path"
-
 ynh_backup "/usr/local/bin/$service_name-loadcubefile.sh"
 
 ynh_backup "/etc/yunohost/hooks.d/90-vpnclient.tpl"

+ 0 - 2
scripts/config

@@ -20,8 +20,6 @@ ynh_abort_if_errors
 # RETRIEVE ARGUMENTS
 #=================================================
 
-final_path=$(ynh_app_setting_get $app final_path)
-
 set_right() {
     if [ -f $1 ]
     then

+ 0 - 12
scripts/install

@@ -39,24 +39,12 @@ ynh_abort_if_errors
 
 # Retrieve arguments
 app=$YNH_APP_INSTANCE_NAME
-final_path="/var/www/$app"
-
-#=================================================
-# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
-#=================================================
-ynh_script_progression "Validating installation parameters..."
-
-# Check destination directory
-test ! -e "$final_path" || ynh_die "Path is already in use: ${final_path}."
-
 
 #=================================================
 # STORE SETTINGS FROM MANIFEST
 #=================================================
 ynh_script_progression "Storing installation settings..."
 
-ynh_app_setting_set "$app" final_path "$final_path"
-
 # Default values for config panel
 ynh_app_setting_set "$app" service_enabled 0
 ynh_app_setting_set "$app" dns_method "yunohost"

+ 1 - 24
scripts/restore

@@ -23,26 +23,10 @@ ynh_print_info "Loading settings..."
 
 app=$YNH_APP_INSTANCE_NAME
 
-final_path=$(ynh_app_setting_get $app final_path)
-
-#=================================================
-# CHECK IF THE APP CAN BE RESTORED
-#=================================================
-ynh_print_info "Validating restoration parameters..."
-
-test ! -d $final_path \
-	|| ynh_die "There is already a directory: $final_path "
-
-#=================================================
-# STANDARD RESTORATION STEPS
-#=================================================
-
 #=================================================
 # RESTORE THE APP MAIN DIR
 #=================================================
-ynh_print_info "Restoring the app main directory..."
-
-ynh_restore_file "$final_path"
+ynh_print_info "Restoring the app filesy..."
 
 ynh_restore_file "/usr/local/bin/$service_name-loadcubefile.sh"
 
@@ -64,13 +48,6 @@ ynh_print_info "Recreating the dedicated system user..."
 ynh_system_user_create $app
 
 #=================================================
-# RESTORE USER RIGHTS
-#=================================================
-
-# Restore permissions on app files
-chown -R $app: $final_path
-
-#=================================================
 # SPECIFIC RESTORATION
 #=================================================
 # REINSTALL DEPENDENCIES

+ 0 - 1
scripts/upgrade

@@ -16,7 +16,6 @@ ynh_print_info "Loading installation settings..."
 
 app=$YNH_APP_INSTANCE_NAME
 
-final_path=$(ynh_app_setting_get $app final_path)
 dns_method=$(ynh_app_setting_get $app dns_method)
 nameservers=$(ynh_app_setting_get $app nameservers)