You could call the start asterix script a the end of the stop script.
As a reference how to do both in one script check out the scripts in /etc/init.d. They are called something like this
Code:
Usege: prog_name start | stop | restart
(Dunno if you are familary with this form of notation. | pipesymbol means or. So you can call the program like prog_name start or prog_name stop or prog_name restart.)
Heres a example script.
Code:
function start_asterix {
your way of starting asterix
if [ $? -eq 0 ]; then
echo date 'asterix started' >> a_log_file
fi
}
function stop_asterix{
your way of stoping asterix
if [ $? -eq 0 ]; then
echo date 'asterix stopped' >> a_log_file
fi
}
case "$ACTION" in
start) start_axterix
;;
stop) stop_asterix
;;
restart) stop_asterix
start_asterix
;;
*) echo "Usage $0 start | stop | restart"
esac