Documentation ¶
Overview ¶
Util for programmatically writing systemd unit file so your service can be autostarted
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnableAndStartCommandHints ¶
func EnableAndStartCommandHints(sf ServiceDefinition) string
gives, among others, command hints for how to start the installed service
func RequireNetworkOnline ¶
func RequireNetworkOnline(sf *ServiceDefinition)
Types ¶
type Option ¶
type Option func(*ServiceDefinition)
func WaitNetworkInterface ¶
systemd automatically dynamically generates units for network devices, so we can wait + bind to them. you can find interesting units by invoking $ systemctl list-unit
type ServiceDefinition ¶
type ServiceDefinition struct {
// contains filtered or unexported fields
}
func Service ¶
func Service(serviceName string, description string, opts ...Option) ServiceDefinition
func UserService ¶
func UserService(serviceName string, description string, opts ...Option) ServiceDefinition
user-level service
Click to show internal directories.
Click to hide internal directories.