Add support for systemd services

This commit is contained in:
Bruno Tavares 2015-04-25 12:30:49 -03:00
parent 6fd8d5bd8f
commit f7a19affc5

View File

@ -1,19 +1,23 @@
kickstart.service.enable() {
[ `which enable` ] && enable $1
kickstart.command_exists enable && enable $1
kickstart.command_exists systemctl && systemctl enable $1
kickstart.os.is "Mac" && kickstart.info "Mac services not supported yet"
}
kickstart.service.disable() {
[ `which disable` ] && disable $1
kickstart.command_exists disable && disable $1
kickstart.command_exists systemctl && systemctl disable $1
kickstart.os.is "Mac" && kickstart.info "Mac services not supported yet"
}
kickstart.service.start() {
[ `which start` ] && start $1
kickstart.command_exists start && start $1
kickstart.command_exists systemctl && systemctl start $1
kickstart.os.is "Mac" && kickstart.info "Mac services not supported yet"
}
kickstart.service.stop() {
[ `which stop` ] && stop $1
kickstart.command_exists stop && stop $1
kickstart.command_exists systemctl && systemctl stop $1
kickstart.os.is "Mac" && kickstart.info "Mac services not supported yet"
}
@ -21,4 +25,3 @@ kickstart.service.restart() {
kickstart.service.stop $1
kickstart.service.start $1
}