Improved debugging with clean up function.
This commit is contained in:
+9
-3
@@ -65,13 +65,19 @@ get_valid_input() {
|
||||
|
||||
# --- GLOBAL FUNCTIONS --->
|
||||
cleanup() {
|
||||
echo -e "\n ✅ Cleaning up..."
|
||||
|
||||
rm -${DIR_RM_FLAGS} "${INSTALL_DIR}"
|
||||
if [[ "${DEBUG}" -eq 1 ]]; then
|
||||
echo -e "\n ✅ Exiting..."
|
||||
echo -e "\n ✅ Debug mode is enabled. Clean up manually files located at ${INSTALL_DIR} or reboot."
|
||||
else
|
||||
echo -e "\n ✅ Cleaning up..."
|
||||
rm -${DIR_RM_FLAGS} "${INSTALL_DIR}"
|
||||
fi
|
||||
|
||||
if [[ -n "${BRIDGE_PID:-}" ]] && ps -p ${BRIDGE_PID} > "${STDOUT}" 2> "${STDERR}"; then
|
||||
kill ${BRIDGE_PID}
|
||||
fi
|
||||
|
||||
echo -e "\n 🌟 Thanks for using Numbus, consider supporting the project !"
|
||||
}
|
||||
|
||||
hierarchy_preparation() {
|
||||
|
||||
Reference in New Issue
Block a user