0

I'm trying to write a script to launch a daemon on both centos and debian.

This is the current pseudo script:

if [ =f "/etc/init.d/functions" ]
  then
    . /etc/unit.d/functions
    alias STARTSTOPDAEMON=daemon
  else
    alias STARTSTOPDAEMON=start-stop-daemon
fi

But then I have two different syntax for the alias...

I have found this on pastebin, I was wondering if it could work cross distro or not.

http://pastebin.com/P6bCsK4S

Any advice?

Sven
  • 97,248
  • 13
  • 177
  • 225
Fez Vrasta
  • 196
  • 1
  • 3
  • 9

0 Answers0