Selaa lähdekoodia

Merge pull request #57 from yalh76/master

Reorder Service and Service in admin panel
Maniack Crudelis 5 vuotta sitten
vanhempi
commit
c3e848ad0a
2 muutettua tiedostoa jossa 12 lisäystä ja 12 poistoa
  1. 7 7
      scripts/remove
  2. 5 5
      scripts/restore

+ 7 - 7
scripts/remove

@@ -23,13 +23,6 @@ final_path=$(ynh_app_setting_get $app final_path)
 
 #=================================================
 # STANDARD REMOVE
-#=================================================
-# STOP AND REMOVE SERVICE
-#=================================================
-
-# Remove the dedicated systemd config
-ynh_remove_systemd_config
-
 #=================================================
 # REMOVE SERVICE FROM ADMIN PANEL
 #=================================================
@@ -41,6 +34,13 @@ then
 	yunohost service remove $app
 fi
 
+#=================================================
+# STOP AND REMOVE SERVICE
+#=================================================
+
+# Remove the dedicated systemd config
+ynh_remove_systemd_config
+
 #=================================================
 # REMOVE DEPENDENCIES
 #=================================================

+ 5 - 5
scripts/restore

@@ -92,17 +92,17 @@ ynh_restore_file "/etc/php5/fpm/pool.d/$app.conf"
 ynh_install_app_dependencies deb1 deb2
 
 #=================================================
-# ADVERTISE SERVICE IN ADMIN PANEL
+# RESTORE SYSTEMD
 #=================================================
 
-yunohost service add $app --log "/var/log/$app/APP.log"
+ynh_restore_file "/etc/systemd/system/$app.service"
+systemctl enable $app.service
 
 #=================================================
-# RESTORE SYSTEMD
+# ADVERTISE SERVICE IN ADMIN PANEL
 #=================================================
 
-ynh_restore_file "/etc/systemd/system/$app.service"
-systemctl enable $app.service
+yunohost service add $app --log "/var/log/$app/APP.log"
 
 #=================================================
 # RESTORE THE CRON FILE