niranjan.reddy | 0e1547a | 2016-02-15 20:10:03 +0530 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # |
| 3 | # Set up cgroupfs mounts. |
| 4 | # |
| 5 | |
| 6 | start() { |
| 7 | printf "Mounting cgroupfs hierarchy: " |
| 8 | /usr/bin/cgroupfs-mount |
| 9 | [ $? = 0 ] && echo "OK" || echo "FAIL" |
| 10 | } |
| 11 | stop() { |
| 12 | printf "Unmounting cgroupfs hierarchy: " |
| 13 | /usr/bin/cgroupfs-umount |
| 14 | [ $? = 0 ] && echo "OK" || echo "FAIL" |
| 15 | } |
| 16 | restart() { |
| 17 | stop |
| 18 | start |
| 19 | } |
| 20 | |
| 21 | case "$1" in |
| 22 | start) |
| 23 | start |
| 24 | ;; |
| 25 | stop) |
| 26 | stop |
| 27 | ;; |
| 28 | restart|reload) |
| 29 | restart |
| 30 | ;; |
| 31 | *) |
| 32 | echo "Usage: $0 {start|stop|restart}" |
| 33 | exit 1 |
| 34 | esac |