| … | |
… | |
| 30 | else |
30 | else |
| 31 | BE_VERBOSE="no" |
31 | BE_VERBOSE="no" |
| 32 | NL= |
32 | NL= |
| 33 | fi |
33 | fi |
| 34 | |
34 | |
| 35 | default_opts="describe start stop restart zap" |
35 | default_opts="describe help start status stop restart zap" |
| 36 | extra_opts="$(. "${myscript}" 2>/dev/null ; echo "${opts}")" |
36 | extra_opts="$(. "${myscript}" 2>/dev/null ; echo "${opts}")" |
| 37 | |
37 | |
| 38 | if [ "${BE_VERBOSE}" = "yes" ] ; then |
38 | if [ "${BE_VERBOSE}" = "yes" ] ; then |
| 39 | printf " |
39 | printf " |
| 40 | ${GREEN}Gentoo RC-Scripts; ${BLUE}http://www.gentoo.org/${OFF} |
40 | ${GREEN}Gentoo RC-Scripts; ${BLUE}http://www.gentoo.org/${OFF} |
| … | |
… | |
| 48 | |
48 | |
| 49 | if [ "${BE_VERBOSE}" = "yes" ] ; then |
49 | if [ "${BE_VERBOSE}" = "yes" ] ; then |
| 50 | printf " |
50 | printf " |
| 51 | ${GREEN}describe${OFF} |
51 | ${GREEN}describe${OFF} |
| 52 | Describe what the service and any extra options do. |
52 | Describe what the service and any extra options do. |
|
|
53 | |
|
|
54 | ${GREEN}help${OFF} |
|
|
55 | This screen - duh. |
| 53 | |
56 | |
| 54 | ${GREEN}start${OFF} |
57 | ${GREEN}start${OFF} |
| 55 | Start service, as well as the services it depends on (if not already |
58 | Start service, as well as the services it depends on (if not already |
| 56 | started). |
59 | started). |
|
|
60 | |
|
|
61 | ${GREEN}status${OFF} |
|
|
62 | Display the current status of the service. |
| 57 | |
63 | |
| 58 | ${GREEN}stop${OFF} |
64 | ${GREEN}stop${OFF} |
| 59 | Stop service, as well as the services that depend on it (if not already |
65 | Stop service, as well as the services that depend on it (if not already |
| 60 | stopped). |
66 | stopped). |
| 61 | |
67 | |
| … | |
… | |
| 65 | Note to developers: If this function is replaced with a custom one, |
71 | Note to developers: If this function is replaced with a custom one, |
| 66 | 'svc_start' and 'svc_stop' should be used instead of 'start' and |
72 | 'svc_start' and 'svc_stop' should be used instead of 'start' and |
| 67 | 'stop' to restart the service. This is so that the dependencies |
73 | 'stop' to restart the service. This is so that the dependencies |
| 68 | can be handled correctly. Refer to the portmap rc-script for an |
74 | can be handled correctly. Refer to the portmap rc-script for an |
| 69 | example. |
75 | example. |
| 70 | |
|
|
| 71 | ${GREEN}conditionalrestart|condrestart${OFF} |
|
|
| 72 | Same as 'restart', but only if the service has already been started. |
|
|
| 73 | |
76 | |
| 74 | ${GREEN}zap${OFF} |
77 | ${GREEN}zap${OFF} |
| 75 | Reset a service that is currently stopped, but still marked as started, |
78 | Reset a service that is currently stopped, but still marked as started, |
| 76 | to the stopped state. Basically for killing zombie services. |
79 | to the stopped state. Basically for killing zombie services. |
| 77 | |
80 | |