7

I have an upstart script to create a service in RedHat 6:

env PLAY_BINARY=/usr/bin/play
env HOME=/opt/warda
env USER=root
env GROUP=root

[...]

script
    exec start-stop-daemon --start --exec $PLAY_BINARY --chuid $USER:$GROUP --chdir $HOME --start $HOME
end script

In Ubuntu everything goes right.

However in RedHat, when I launch sudo initctl start play, I get a successful feedback play start/running, but play doesn't run.

I think that the problem is that start-stop-daemon doesn't exist in RedHat.

How can I replace the exec start-stop-daemon... command?

RikyTres
  • 203
  • 3
  • 8

1 Answers1

6

You could try the daemonize command, which is available from the EPEL repository. It seems to do most of what you require here.

laubai
  • 101
  • 1
  • 3