$ service vsmserver status ThinLinc vsmserver is stopped $ sudo service vsmserver status [sudo] password for cendio: ThinLinc vsmserver (pid 1188) is running
We could source /lib/lsb/init-functions as the other init script does and provided init helper functions like: status_of_proc -p /var/run/sshd.pid /usr/sbin/sshd sshd && exit 0 || exit $? which in it ends does: if $(kill -0 "${pid:-}" 2> /dev/null); then echo "$pid" return 0 elif ps "${pid:-}" >/dev/null 2>&1; then echo "$pid" return 0 # program is running, but not owned by this user else return 1 # program is dead and /var/run pid file exists fi Comparing this to our own, we just fail if kill -0 failes, which will always fail for non root users in our case and give the false status.
*** This bug has been marked as a duplicate of bug 1443 ***