control c trap

pull/12/head
Tom Early 7 years ago
parent 9cc160d32f
commit 48dc1ac8d3

@ -15,6 +15,15 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
trap ControlC INT
ControlC () {
sudo killall journalctl
if [ $? -ne 0 ]; then
exit 0
fi
}
InstallSystem () { InstallSystem () {
local n local n
if [ -z ${1} ]; then if [ -z ${1} ]; then
@ -166,7 +175,7 @@ LogMenu () {
clear clear
echo " Log Menu" echo " Log Menu"
echo echo
echo "After starting a log, use <Control>-C to stop the log and return to this menu." echo "After starting a log, use <Ctrl>+C to stop the log and return to this menu."
echo echo
if [[ $GateState == 'running' ]]; then if [[ $GateState == 'running' ]]; then
echo " g : qngateway Log" echo " g : qngateway Log"

Loading…
Cancel
Save

Powered by TurnKey Linux.