Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | ### BEGIN INIT INFO |
| 3 | # Provides: oprofile-server |
| 4 | # Required-Start: $network |
| 5 | # Required-Stop: $network |
| 6 | # Default-Start: 2 3 4 5 |
| 7 | # Default-Stop: 0 1 6 |
| 8 | # Short-Description: OProfileUI server |
| 9 | # Description: |
| 10 | ### END INIT INFO |
| 11 | |
| 12 | . /etc/init.d/functions |
| 13 | |
| 14 | case "$1" in |
| 15 | start) |
| 16 | echo "Starting OProfileUI server" |
| 17 | . /etc/profile |
| 18 | /usr/bin/oprofile-server & |
| 19 | ;; |
| 20 | |
| 21 | stop) |
| 22 | echo "Stopping OProfileUI server" |
| 23 | killproc oprofile-server |
| 24 | ;; |
| 25 | |
| 26 | restart) |
| 27 | $0 stop |
| 28 | sleep 1 |
| 29 | $0 start |
| 30 | ;; |
| 31 | |
| 32 | *) |
| 33 | echo "usage: $0 { start | stop | restart }" |
| 34 | ;; |
| 35 | esac |
| 36 | |
| 37 | exit 0 |