Commit 56d8dac
authored
Update mysqlmonitor.sh
Added terminal cleanup functionality to ensure proper restoration of the terminal state upon script exit or interruption.
Included a trap command to handle SIGINT, SIGTERM, and EXIT signals, invoking the cleanup function on script termination or interruption.
Updated the cleanup function to disable line wrapping and restore the terminal screen using tput commands (smcup and rmcup).
Modified the script to provide a more graceful exit, including a goodbye message when the script terminates.1 parent f72c266 commit 56d8dac
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | 72 | | |
75 | 73 | | |
76 | 74 | | |
77 | 75 | | |
78 | 76 | | |
79 | | - | |
| 77 | + | |
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
83 | 81 | | |
84 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
0 commit comments