Browse Source

Remove self-call, remove after backup

Ernesto Nicolás Carrea 5 years ago
parent
commit
93c8333fb4
2 changed files with 3 additions and 9 deletions
  1. 0 4
      bin/module/vsftpd/install.inc
  2. 3 5
      bin/module/vsftpd/remove.inc

+ 0 - 4
bin/module/vsftpd/install.inc

@@ -39,7 +39,3 @@ hestia_module_vsftpd_install() {
 
     exit 0
 }
-
-# If this files is _not_ being sourced, act immediately
-# (otherise, wait for hestia cli to call the main function)
-[[ $_ == $0 ]] && hestia_module_vsftpd_install $@

+ 3 - 5
bin/module/vsftpd/remove.inc

@@ -19,9 +19,11 @@ hestia_module_vsftpd_remove() {
 
     osal_service_stop vsftpd
     osal_service_disable vsftpd
-    osal_package_remove vsftpd
 
     hestia_config_backup 'vsftpd-remove' $OSAL_PATH_VSFTPD_CONF/vsftpd.conf
+
+    osal_package_remove vsftpd
+   
     rm -f $OSAL_PATH_VSFTPD_CONF/vsftpd.conf
 
     osal_kv_write $HESTIA/conf/hestia.conf 'FTP_SYSTEM' 'no'
@@ -33,7 +35,3 @@ hestia_module_vsftpd_remove() {
 
     exit 0
 }
-
-# If this files is _not_ being sourced, act immediately
-# (otherise, wait for hestia cli to call the main function)
-[[ $_ == $0 ]] && hestia_module_vsftpd_remove $@