Documentation
¶
Overview ¶
Package systemd offers an interface over systemd
Index ¶
- Constants
- func DisableUnit(ctx context.Context, unit string) (err error)
- func EnableUnit(ctx context.Context, unit string) (err error)
- func IsRunning() (running bool, err error)
- func Reload(ctx context.Context) (err error)
- func RemoveUnit(ctx context.Context, unit string) (err error)
- func StartUnit(ctx context.Context, unit string, args ...string) (err error)
- func StopUnit(ctx context.Context, unit string, args ...string) (err error)
- func WriteEmbeddedUnit(ctx context.Context, unit string) (err error)
- func WriteUnitOverride(ctx context.Context, unit string, name string, content string) (err error)
Constants ¶
View Source
const (
// UnitsPath is the path where systemd unit files are stored
UnitsPath = "/etc/systemd/system"
)
Variables ¶
This section is empty.
Functions ¶
func DisableUnit ¶
DisableUnit disables a systemd unit
func EnableUnit ¶
EnableUnit enables a systemd unit
func IsRunning ¶
IsRunning checks if systemd is running using the documented way https://www.freedesktop.org/software/systemd/man/latest/sd_booted.html#Notes
func RemoveUnit ¶
RemoveUnit removes a systemd unit
func WriteEmbeddedUnit ¶
WriteEmbeddedUnit writes a systemd unit from embedded resources
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.