11 |
{ |
{ |
12 |
local command="$1" |
local command="$1" |
13 |
local service="$2" |
local service="$2" |
|
local argv="$3" |
|
14 |
local chrooted |
local chrooted |
15 |
|
|
16 |
if [[ -n ${MROOT} ]] && [[ ${MROOT} != / ]] |
if [[ -n ${MROOT} ]] && [[ ${MROOT} != / ]] |
38 |
fi |
fi |
39 |
|
|
40 |
case "${command}" in |
case "${command}" in |
41 |
start) ${chrooted} systemctl start "${service}" "${argv}" ;; |
start) ${chrooted} systemctl start "${service}" ;; |
42 |
stop) ${chrooted} systemctl stop "${service}" "${argv}" ;; |
stop) ${chrooted} systemctl stop "${service}" ;; |
43 |
#restart) ${chrooted} systemctl try-restart "${service}" "${argv}" ;; |
#restart) ${chrooted} systemctl try-restart "${service}" ;; |
44 |
restart) ${chrooted} systemctl restart "${service}" "${argv}" ;; |
restart) ${chrooted} systemctl restart "${service}" ;; |
45 |
reload) ${chrooted} systemctl reload-or-try-restart "${service}" "${argv}" ;; |
reload) ${chrooted} systemctl reload-or-try-restart "${service}" ;; |
46 |
enable) ${chrooted} systemctl enable "${service}" "${argv}" ;; |
enable) ${chrooted} systemctl enable "${service}" ;; |
47 |
disable) ${chrooted} systemctl disable "${service}" "${argv}" ;; |
disable) ${chrooted} systemctl disable "${service}" ;; |
48 |
status) ${chrooted} systemctl status "${service}" "${argv}" ;; |
status) ${chrooted} systemctl status "${service}" ;; |
49 |
enabled) ${chrooted} systemctl is-enabled "${service}"; rvecho "$?" ;; |
enabled) ${chrooted} systemctl is-enabled "${service}"; rvecho "$?" ;; |
50 |
runlevel) rvecho "$(readline ${MROOT}@@SYSTEMDSYSTEMCONFDIR@@/default.target)" ;; |
runlevel) rvecho "$(readline ${MROOT}@@SYSTEMDSYSTEMCONFDIR@@/default.target)" ;; |
51 |
*) return 1 ;; |
*) return 1 ;; |