Add support for systemd services
This commit is contained in:
parent
6fd8d5bd8f
commit
f7a19affc5
@ -1,19 +1,23 @@
|
|||||||
kickstart.service.enable() {
|
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.os.is "Mac" && kickstart.info "Mac services not supported yet"
|
||||||
}
|
}
|
||||||
kickstart.service.disable() {
|
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.os.is "Mac" && kickstart.info "Mac services not supported yet"
|
||||||
}
|
}
|
||||||
|
|
||||||
kickstart.service.start() {
|
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.os.is "Mac" && kickstart.info "Mac services not supported yet"
|
||||||
}
|
}
|
||||||
|
|
||||||
kickstart.service.stop() {
|
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"
|
kickstart.os.is "Mac" && kickstart.info "Mac services not supported yet"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -21,4 +25,3 @@ kickstart.service.restart() {
|
|||||||
kickstart.service.stop $1
|
kickstart.service.stop $1
|
||||||
kickstart.service.start $1
|
kickstart.service.start $1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user