Code Monkey home page Code Monkey logo

chef-ghostdriver's People

Watchers

 avatar  avatar  avatar

Forkers

zackyaz

chef-ghostdriver's Issues

rhel_initd strange behaver in start stop service

Hi

In rhel_initd I found some strange behaver
When I start first time
/etc/init.d/ghostdriver_node_0 start
It is ok and the pid is in the file /var/run/ghostdriver_node_0.pid correctly
Then I can run stop and it is ok

One problem is when I run /etc/init.d/ghostdriver_node_0 start 2 time ( one after the other )
In that case the output in OK , the pid file change to the last pid but the process is the first one
ps -el | grep phantomjs
0 S 2011 14166 1 0 80 0 - 630239 poll_s ? 00:00:00 phantomjs
In the PID file I have 14590
The /etc/init.d/ghostdriver_node_0 stop is failed

Second problem is that I cannot run stop command 2 time the second time is failed

We can add some condition to the file to solve some problem

start() {
echo -n $"Starting $prog: "
if [ -f $pidfile ]; then
echo
echo -n $"($pidfile exist) already running.. "
RETVAL=0
success
echo
return $RETVAL
else
touch $pidfile
chown $user $pidfile
โ€ฆ
stop() {
echo -n $"Stopping $prog: "
if [ -f $pidfile ]; then
killproc -p $pidfile $prog
RETVAL=$?
else
RETVAL=0
echo -n $"already stopped.."
success
fi
echo
[ $RETVAL -eq 0 ] && rm -f $lockfile $pidfile
return $RETVAL

regards zacky

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.