User Guide

122 Chapter 6 Configuring Verity K2 Server
Stopping K2 Server
You can run K2 Server either as a Windows service or in a command window, as an
ordinary application. Unless you use the
-ntService 1 option when starting K2
Server, K2 runs in the command window.
Stopping K2 when run as a service
To halt K2 Server when it is running as a Windows service, you have two options:
Open the Services Control Panel and stop the K2 Server service.
Open a command window and enter the command:
k2server -ntService 0
Stopping K2 when run as an application
When K2 is running as an application in a command window, you stop K2 by issuing
a Ctrl+C keyboard command to kill the process in the window where it is running.
Stopping K2 Server on Linux/UNIX
The ColdFusion installation includes a script for halting K2 Server. The stopk2server
script can be found in
/opt/coldfusion/bin by default.
UNIX/Linux stopk2server script file listing
#!/bin/sh
#
# stop k2 server - setup environment and stop k2 server
#
#
# Get the pid for the process specified
#
pidproc()
{
pid=‘ps -eo’pid,comm’ |
grep $1 |
sed -e ’s/^ *//’ -e ’s/ .*//’‘
}
#
# Kill named process(es).
# Try killing it nicely at first. If it won’t die willing,
# then use kill -9
#
killproc()
{
pidproc $1