https://github.com/pytimer/initsystem
It is the library that detect a supported init system.
https://github.com/pytimer/initsystem
systemd
Last synced: 5 months ago
JSON representation
It is the library that detect a supported init system.
- Host: GitHub
- URL: https://github.com/pytimer/initsystem
- Owner: pytimer
- License: apache-2.0
- Created: 2019-07-22T04:35:57.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-23T01:07:10.000Z (almost 7 years ago)
- Last Synced: 2024-06-20T15:48:02.086Z (almost 2 years ago)
- Topics: systemd
- Language: Go
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# initsystem
[](https://godoc.org/github.com/pytimer/initsystem)
It is the library that detect a supported init system.
This library reference the [kubeadm initsystem package](https://github.com/kubernetes/kubernetes/tree/master/cmd/kubeadm/app/util/initsystem).
## Supported system
- Systemd
## Usage
```go
package main
import (
"log"
"github.com/pytimer/initsystem"
)
func main() {
initSystem, err := initsystem.GetInitSystem()
if err != nil {
log.Fatal(err)
}
log.Println(initSystem.IsActive("sshd.service"))
}
```