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 2665 by niro, Tue Nov 10 15:33:29 2015 UTC revision 2666 by niro, Fri Dec 4 10:56:16 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"
14     local argv="$3"
15   local chrooted   local chrooted
16    
17   if [[ -n ${MROOT} ]] && [[ ${MROOT} != / ]]   if [[ -n ${MROOT} ]] && [[ ${MROOT} != / ]]
# Line 38  control_service() Line 39  control_service()
39   fi   fi
40    
41   case "${command}" in   case "${command}" in
42   start) ${chrooted} systemctl start "${service}" ;;   start) ${chrooted} systemctl start "${service}" "${argv}" ;;
43   stop) ${chrooted} systemctl stop "${service}" ;;   stop) ${chrooted} systemctl stop "${service}" "${argv}" ;;
44   #restart) ${chrooted} systemctl try-restart "${service}" ;;   #restart) ${chrooted} systemctl try-restart "${service}" "${argv}" ;;
45   restart) ${chrooted} systemctl restart "${service}" ;;   restart) ${chrooted} systemctl restart "${service}" "${argv}" ;;
46   reload) ${chrooted} systemctl reload-or-try-restart "${service}" ;;   reload) ${chrooted} systemctl reload-or-try-restart "${service}" "${argv}" ;;
47   enable) ${chrooted} systemctl enable "${service}" ;;   enable) ${chrooted} systemctl enable "${service}" "${argv}" ;;
48   disable) ${chrooted} systemctl disable "${service}" ;;   disable) ${chrooted} systemctl disable "${service}" "${argv}" ;;
49   status) ${chrooted} systemctl status "${service}" ;;   status) ${chrooted} systemctl status "${service}" "${argv}" ;;
50   enabled) ${chrooted} systemctl is-enabled "${service}"; rvecho "$?" ;;   enabled) ${chrooted} systemctl is-enabled "${service}"; rvecho "$?" ;;
51   runlevel) rvecho "$(readline ${MROOT}@@SYSTEMDSYSTEMCONFDIR@@/default.target)" ;;   runlevel) rvecho "$(readline ${MROOT}@@SYSTEMDSYSTEMCONFDIR@@/default.target)" ;;
52   *) return 1 ;;   *) return 1 ;;

Legend:
Removed from v.2665  
changed lines
  Added in v.2666