Browse Source

Fix some linter warnings

Alexandre Aubin 4 years ago
parent
commit
7e9ca574b8
3 changed files with 16 additions and 16 deletions
  1. 10 10
      scripts/install
  2. 3 3
      scripts/remove
  3. 3 3
      scripts/restore

+ 10 - 10
scripts/install

@@ -39,14 +39,14 @@ ynh_abort_if_errors
 
 # Retrieve arguments
 domain=$YNH_APP_ARG_DOMAIN
-path_url=$(ynh_normalize_url_path "$YNH_APP_ARG_PATH")
+path_url=$YNH_APP_ARG_PATH
 app=$YNH_APP_INSTANCE_NAME
 final_path="/var/www/$app"
 
 #=================================================
 # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
 #=================================================
-ynh_print_info "Validating installation parameters..."
+ynh_script_progression "Validating installation parameters..."
 
 # Check destination directory
 test ! -e "$final_path" || ynh_die "Path is already in use: ${final_path}."
@@ -57,7 +57,7 @@ ynh_webpath_register "$app" "$domain" "$path_url"
 #=================================================
 # STORE SETTINGS FROM MANIFEST
 #=================================================
-ynh_print_info "Storing installation settings..."
+ynh_script_progression "Storing installation settings..."
 
 ynh_app_setting_set "$app" domain "$domain"
 ynh_app_setting_set "$app" final_path "$final_path"
@@ -67,26 +67,26 @@ ynh_app_setting_set "$app" final_path "$final_path"
 #=================================================
 # INSTALL DEPENDENCIES
 #=================================================
-ynh_print_info "Installing dependencies..."
+ynh_script_progression "Installing dependencies..."
 
 ynh_install_app_dependencies "$pkg_dependencies"
 
 #=================================================
 # DEPLOY FILES FROM PACKAGE
 #=================================================
-ynh_print_info "Deploy files from package..."
+ynh_script_progression "Deploy files from package..."
 
 vpnclient_deploy_files_and_services
 
 #=================================================
 # RELOAD SERVICES
 #=================================================
-ynh_print_info "Reloading services..."
+ynh_script_progression "Reloading services..."
 
 # Set default inits
 # The boot order of these services are important, so they are disabled by default
 # and the vpnclient service handles them.
-systemctl disable openvpn
+systemctl disable openvpn --quiet
 systemctl stop openvpn
 
 # main service
@@ -97,12 +97,12 @@ yunohost service enable $service_name
 # checker service
 
 systemctl start $service_checker_name
-systemctl enable $service_checker_name
+systemctl enable $service_checker_name --quiet
 systemctl start $service_checker_name.timer
-systemctl enable $service_checker_name.timer
+systemctl enable $service_checker_name.timer --quiet
 
 #=================================================
 # END OF SCRIPT
 #=================================================
 
-ynh_print_info "Installation of $app completed"
+ynh_script_progression "Installation of $app completed"

+ 3 - 3
scripts/remove

@@ -40,14 +40,14 @@ domain=$(ynh_app_setting_get $app domain)
 ynh_print_info "Stopping and removing services"
 
 systemctl stop $service_checker_name
-systemctl disable $service_checker_name
+systemctl disable $service_checker_name --quiet
 systemctl stop $service_checker_name.timer && sleep 1
-systemctl disable $service_checker_name.timer
+systemctl disable $service_checker_name.timer --quiet
 
 if ynh_exec_warn_less yunohost service status $service_name >/dev/null
 then
     yunohost service stop $service_name
-    yunohost service disable $service_name
+    yunohost service disable $service_name --quiet
     yunohost service remove $service_checker
 fi
 

+ 3 - 3
scripts/restore

@@ -109,9 +109,9 @@ ynh_restore_file "/etc/systemd/system/$service_checker_name.service"
 ynh_restore_file "/etc/systemd/system/$service_checker_name.timer"
 ynh_restore_file "/etc/systemd/system/openvpn@.service"
 systemctl daemon-reload
-systemctl enable "$service_name.service"
-systemctl enable "$service_checker_name.service"
-systemctl enable "openvpn@.service"
+systemctl enable "$service_name.service" --quiet
+systemctl enable "$service_checker_name.service" --quiet
+systemctl enable "openvpn@.service" --quiet
 
 #=================================================
 # ADVERTISE SERVICE IN ADMIN PANEL