hi Paros,
Yes, you should be able to do it.
If no pid file exist with your server, you can use the ps command, like this For example with btsync server
- Code: Select all
ps -ef|grep btsync|grep -c grep
. You get 1 if it is running and 0 if not.
if you have a pid file, you can use the command line, still with btsync server:
- Code: Select all
cat /proc/`cat /var/run/btsync.pid`/cmdline|grep -c btsync
you get 0 if it is not running and >0 if it is running