Browse Source

add trap to cleanup before exit

HgO 1 year ago
parent
commit
2059487441
1 changed files with 3 additions and 0 deletions
  1. 3 0
      conf/ynh-vpnclient

+ 3 - 0
conf/ynh-vpnclient

@@ -63,6 +63,9 @@ cleanup() {
   fi
 }
 
+# Cleanup before exit
+trap cleanup 0
+
 ###################################################################################
 # Time sync                                                                       #
 ###################################################################################