~ubuntu-branches/ubuntu/karmic/asterisk/karmic-security

« back to all changes in this revision

Viewing changes to debian/asterisk.init

  • Committer: Bazaar Package Importer
  • Author(s): Thierry Carrez
  • Date: 2008-09-29 14:21:59 UTC
  • Revision ID: james.westby@ubuntu.com-20080929142159-8wjx88sv5fajvrk4
Tags: 1:1.4.21.2~dfsg-1ubuntu3
* debian/asterisk.init: Fix status action so that it returns the
  LSB-compliant return codes (LP: #248947)
* debian/control: added lsb-base dependency for using status_of_proc

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
UMASK=007 # by default
47
47
#MAXFILES=1024 # (the system default)
48
48
 
 
49
. /lib/lsb/init-functions
 
50
 
49
51
# by default: use real-time priority
50
52
PARAMS=""
51
53
CHDIR_PARM=""
126
128
fi
127
129
 
128
130
status() {
129
 
        plist=`ps ax | awk "{ if (\\$5 == \"$DAEMON\") print \\$1 }"`
130
 
        if [ "$plist" = "" ]; then
131
 
                echo "$DESC is stopped"
132
 
                return 1
133
 
        else
134
 
                echo "$DESC is running: $plist"
135
 
                return 0
136
 
        fi
 
131
        status_of_proc "$DAEMON" "$DESC" && return 0 || return $?
137
132
}
138
133
 
139
134
asterisk_rx() {