예제 #1
0
func getInitSystemType() int {
	if util.FileExistsInPath("systemctl") {
		return SystemD
	}

	if util.FileExistsInPath("update-rc.d") {
		return UpdateRcD
	}

	if util.FileExistsInPath("chkconfig") {
		return ChkConfig
	}

	return Unknown
}
예제 #2
0
파일: service.go 프로젝트: taik0/rexray
func GetInitSystemType() int {
	if util.FileExistsInPath("systemctl") {
		return SYSTEMD
	}

	if util.FileExistsInPath("update-rc.d") {
		return UPDATERCD
	}

	if util.FileExistsInPath("chkconfig") {
		return CHKCONFIG
	}

	return UNKNOWN
}