1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/bin/bash exit_program(){ # cd $curdir # if [ "$3" == "save_log" ] # then # tar cvfz $curdir/$(basename $tempdir)-$launch_timestamp.tgz $tempdir # fi # rm -rf $tempdir if [ $1 -ne 0 ] then logit "EXIT" "$2 ($1)" else logit "EXIT" "$2" fi exit $1 }