// SPDX-License-Identifier: GPL-3.0-or-later

//go:build darwin

package service

// detectInitSystem on macOS always returns launchd.
func detectInitSystem() InitSystem {
	return InitLaunchd
}

// newManager creates the appropriate Manager for the given init system.
func newManager(initSys InitSystem) (Manager, error) {
	switch initSys {
	case InitLaunchd:
		return &launchdManager{}, nil
	default:
		return nil, ErrUnsupportedInitSystem
	}
}
