Improved debugging with clean up function.

This commit is contained in:
Raphaël Numbus
2026-05-25 17:25:41 +02:00
parent 0f070e1124
commit adbbda4a9d
+9 -3
View File
@@ -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() {