internal/app: rename init to init0
This makes way for the new container init. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
18
internal/app/init0/early.go
Normal file
18
internal/app/init0/early.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package init0
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"git.gensokyo.uk/security/fortify/internal"
|
||||
)
|
||||
|
||||
// used by the parent process
|
||||
|
||||
// TryArgv0 calls [Main] if the last element of argv0 is "init0".
|
||||
func TryArgv0() {
|
||||
if len(os.Args) > 0 && path.Base(os.Args[0]) == "init0" {
|
||||
Main()
|
||||
internal.Exit(0)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user