#!/bin/sh
if [ $# != 2 ]; then
echo "Usage: debug_ctrl <on | off | print | verbose> process_name"
exit
fi
if [ "$1" = on ]; then
killall -s 41 $2
elif [ "$1" = off ]; then
killall -s 42 $2
elif [ "$1" = verbose ]; then
killall -s 39 $2
else
killall -s 40 $2
cat /tmp/.debug_msg
rm -f /tmp/.debug_msg
fi