Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/src/modules/systemd/mcore-system-service.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2670 by niro, Fri Dec 4 10:56:16 2015 UTC revision 2671 by niro, Fri Dec 4 12:11:42 2015 UTC
# Line 11  control_service() Line 11  control_service()
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} != / ]]
# Line 39  control_service() Line 38  control_service()
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 ;;

Legend:
Removed from v.2670  
changed lines
  Added in v.2671