Currently the Sling standalone application can only be stopped by stopping the system bundle or by killing the Sling process. To better control Sling control connection support based on TCP/IP would be nice. This way the same sling standalone application may be used to start sling, to check a running sling instance and to stop a running sling instance.
The following command line arguments are added:
"start" - Sling opens a TCP/IP server socket for the control conneciton
"status" - Checks whether a Sling instance is listening on a TCP/IP socket
"stop" - Stops a Sling instance listening on a TCP/IP socket
none of the above - starts Sling without listening on a TCP/IP socket
The socket to listen on (start option) or to send the command to (status, stop) is configured with the "-j" command line option. This option takes an argument of the following form:
host:port – host name or ip address and port number of the socket
port – port number on localhost (InetAddress.getLocalHost()) of the socket
none or -j not specified – defaults to port 63000 on localhost
Note, that setting any host name or IP address, which is reachable from remote systems may be considered as security issue, since the connection is not secured by password or such. For this reason the default interface to listen on is local host and the server socket is only created if explicitly asked for with the start parameter.