3

I run a script manually like/usr/lib/openoffice.org/program/soffice and when I run

:ps -ef|grep openoffice

I get the following,

root 700 1 0 10:45 ? 00:00:00 /bin/sh /usr/lib/openoffice.org/program/soffice -calc

My question is how to check whether this script is running or not (It can be checked every 10 minutes) and how to make it as a service. (I don't have root access to put this in rc.local file or somewhere else).

1
  • 1
    This should be moved to superuser.com. Jan 29, 2010 at 6:19

2 Answers 2

1

you can use pidof to get pid of process

0

try this

while true
do
 pidof openoffice 1>/dev/null
 if [ $? -eq "1" ];then
  /usr/lib/openoffice.org/program/soffice &
 fi
 sleep 600
done

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .