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