12 |
[[ -z ${command} ]] && help_system_service && return 1 |
[[ -z ${command} ]] && help_system_service && return 1 |
13 |
[[ -z ${service} ]] && help_system_service && return 1 |
[[ -z ${service} ]] && help_system_service && return 1 |
14 |
|
|
|
if [[ ! -x ${MROOT}@@SYSVRCDDIR@@/${service} ]] |
|
|
then |
|
|
eecho "Service '${service}' unknown!" |
|
|
return 1 |
|
|
fi |
|
|
|
|
|
if [[ -n ${MROOT} ]] && [[ ${MROOT} != / ]] |
|
|
then |
|
|
case "${command}" in |
|
|
start|stop|restart|reload) |
|
|
eecho "Command not available while \$MROOT is set" |
|
|
return 1 |
|
|
;; |
|
|
esac |
|
|
fi |
|
|
|
|
15 |
case "${command}" in |
case "${command}" in |
16 |
start) @@SYSVRCDDIR@@/"${service}" start ;; |
start) mcore-system-service start "${service}" ;; |
17 |
stop) @@SYSVRCDDIR@@/"${service}" stop ;; |
stop) mcore-system-service stop "${service}" ;; |
18 |
restart) @@SYSVRCDDIR@@/"${service}" restart ;; |
restart) mcore-system-service restart "${service}" ;; |
19 |
reload) @@SYSVRCDDIR@@/"${service}" reload ;; |
reload) mcore-system-service reload "${service}" ;; |
20 |
enable) rc-config add "${service}" ;; |
enable) mcore-system-service enable "${service}" ;; |
21 |
disable) rc-config del "${service}" ;; |
disable) mcore-system-service disable "${service}" ;; |
22 |
*) help_system_service && return ;; |
*) help_system_service && return 1 ;; |
23 |
esac |
esac |
24 |
} |
} |
25 |
|
|
31 |
[[ -z ${command} ]] && help_system_service && return 1 |
[[ -z ${command} ]] && help_system_service && return 1 |
32 |
[[ -z ${service} ]] && help_system_service && return 1 |
[[ -z ${service} ]] && help_system_service && return 1 |
33 |
|
|
|
if [[ ! -x ${MROOT}@@SYSVRCDDIR@@/${service} ]] |
|
|
then |
|
|
eecho "Service '${service}' unknown!" |
|
|
return 1 |
|
|
fi |
|
|
|
|
|
if [[ -n ${MROOT} ]] && [[ ${MROOT} != / ]] |
|
|
then |
|
|
case "${command}" in |
|
|
status) |
|
|
eecho "Command not available while \$MROOT is set" |
|
|
return 1 |
|
|
;; |
|
|
esac |
|
|
fi |
|
|
|
|
34 |
case "${command}" in |
case "${command}" in |
35 |
status) @@SYSVRCDDIR@@/"${service}" status ;; |
status) mcore-system-service status "${service}" status ;; |
36 |
enabled) rc-config show "${service}" ;; |
enabled) mcore-system-service enabled "${service}" ;; |
37 |
runlevel) eecho "function on todo" ;; |
runlevel) mcore-system-service runlevel ;; |
38 |
*) help_system_service && return ;; |
*) help_system_service && return 1 ;; |
39 |
esac |
esac |
40 |
} |
} |