# $Id$ provide basic-init sysvinit require basic-system set_system_service() { local command="${CLASS_ARGV[0]}" local service="${CLASS_ARGV[1]}" local opts="${CLASS_ARGV[2]}" [[ -z ${command} ]] && help_system_service && return 1 [[ -z ${service} ]] && help_system_service && return 1 case "${command}" in start) mcore-system-service start "${service}" ;; stop) mcore-system-service stop "${service}" ;; restart) mcore-system-service restart "${service}" ;; reload) mcore-system-service reload "${service}" ;; enable) mcore-system-service enable "${service}" ;; disable) mcore-system-service disable "${service}" ;; *) help_system_service && return 1 ;; esac } get_system_service() { local command="${CLASS_ARGV[0]}" local service="${CLASS_ARGV[1]}" [[ -z ${command} ]] && help_system_service && return 1 [[ -z ${service} ]] && help_system_service && return 1 case "${command}" in status) mcore-system-service status "${service}" status ;; enabled) mcore-system-service enabled "${service}" ;; runlevel) mcore-system-service runlevel ;; *) help_system_service && return 1 ;; esac }