#!/bin/sh
# chkconfig: 345 84 16
# description: JCC server starter script
jchem_home=/path/to/jchem
jcc_user=jchemusername

case "$1" in
        start|stop)
                su - $jcc_user -c "cd $jchem_home/cartridge; nohup bash server.sh $1 &> out.log &"
                ;;
        *)
                echo "Unsupported command $1";
                exit 1;
        esac