Project

General

Profile

Actions

How to start and close the server 4 on GNU/Linux system ?

Once installed, the Scol server will start at each system reboot, if the option is checked during the installation. However, you might want to do this manually.

Basically, to close the server, this command should be enough :

killall -TERM usmunix

And to restart the server (from the Scol directory) :

nohup ./startscol.sh &

You might want also a simple script. You could write something like that (change the content of PATH_SCOL) :

#!/bin/bash

PATH_SCOL=/path/where/Scol/is/installed/
PATH_CURRENT=$PWD

case "$1" in
'start')
    cd $PATH_SCOL
    nohup ./startscol.sh &
    cd $PATH_CURRENT
    ;;
'stop')
    if ps -d | grep usmunix; then
        killall -TERM usmunix
    fi
    ;;
*)
    echo "Usage: $0 { start | stop }" 
    ;;
esac
exit 0

Don't forget a little chmod :

chmod +x name_of_script

You can put also the script in your /etc/init.d directory. The rights on the script must be sufficient for start and close Scol.

To call the script :

Here, the script has been named c_scol.sh

cd path_to_script
./lc_scol.sh start

and

cd path_to_script
./lc_scol.sh stop

Updated by iri over 11 years ago · 1 revisions