| Revision 641,
1.2 KB
checked in by dcarter, 4 years ago
(diff) |
|
see #111 - merge release 0.8 to main branch
|
| Line | |
|---|
| 1 | #!/bin/sh |
|---|
| 2 | # |
|---|
| 3 | # Startup script for the ARM4 daemon |
|---|
| 4 | # |
|---|
| 5 | # Copyright (c) 2005-2008 David Carter <dcarter@arm4.org> and others. |
|---|
| 6 | # All rights reserved. This program and the accompanying materials |
|---|
| 7 | # are made available under the terms of the Eclipse Public License v1.0 |
|---|
| 8 | # which accompanies this distribution, and is available at |
|---|
| 9 | # http://www.eclipse.org/legal/epl-v10.html |
|---|
| 10 | # |
|---|
| 11 | # chkconfig: - 85 15 |
|---|
| 12 | # description: ARM 4 application response measurement agent |
|---|
| 13 | # processname: arm4_daemon |
|---|
| 14 | # pidfile: /var/run/arm4.pid |
|---|
| 15 | |
|---|
| 16 | # Source function library. |
|---|
| 17 | . /etc/rc.d/init.d/functions |
|---|
| 18 | |
|---|
| 19 | arm4=/usr/local/bin/arm4_daemon |
|---|
| 20 | RETVAL=0 |
|---|
| 21 | |
|---|
| 22 | case "$1" in |
|---|
| 23 | start) |
|---|
| 24 | echo -n "Starting arm4: " |
|---|
| 25 | daemon $arm4 |
|---|
| 26 | RETVAL=$? |
|---|
| 27 | echo |
|---|
| 28 | [ $RETVAL = 0 ] && touch /var/lock/subsys/arm4 |
|---|
| 29 | ;; |
|---|
| 30 | stop) |
|---|
| 31 | echo -n "Shutting down arm4: " |
|---|
| 32 | killproc $arm4 |
|---|
| 33 | RETVAL=$? |
|---|
| 34 | echo |
|---|
| 35 | [ $RETVAL = 0 ] && rm -f /var/lock/subsys/arm4 |
|---|
| 36 | [ $RETVAL = 0 ] && rm -f /var/run/arm4.pid |
|---|
| 37 | ;; |
|---|
| 38 | status) |
|---|
| 39 | status $arm4 |
|---|
| 40 | RETVAL=$? |
|---|
| 41 | ;; |
|---|
| 42 | reload) |
|---|
| 43 | # Same as restart |
|---|
| 44 | $0 stop |
|---|
| 45 | $0 start |
|---|
| 46 | ;; |
|---|
| 47 | restart) |
|---|
| 48 | $0 stop |
|---|
| 49 | $0 start |
|---|
| 50 | ;; |
|---|
| 51 | *) |
|---|
| 52 | echo "Usage: $0 {start|stop|reload|restart|status}" |
|---|
| 53 | exit 1 |
|---|
| 54 | esac |
|---|
| 55 | |
|---|
| 56 | exit $RETVAL |
|---|
Note: See
TracBrowser
for help on using the repository browser.