Skip to content

Commit

Permalink
Simplified help message
Browse files Browse the repository at this point in the history
  • Loading branch information
aandryashin committed Feb 10, 2017
1 parent ab73494 commit 8815c8d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Micro init

Runs within container as process with pid 1, translates received signals to child processes and wait until all of them exit.
It runs within container as process with pid 1, translates received signals to child processes and wait until all of them exit.

Usage:

```init COMMAND [args...]
Useful to run servers like [this](https://github.com/facebookgo/grace) within containers.
11 changes: 1 addition & 10 deletions init.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
package main

import (
"flag"
"fmt"
"io"
"log"
Expand All @@ -12,17 +11,9 @@ import (
"syscall"
)

func init() {
flag.Usage = func() {
fmt.Println("Usage: init COMMAND [args...]")
flag.PrintDefaults()
}
flag.Parse()
}

func main() {
if len(os.Args) < 2 {
flag.Usage()
fmt.Println("Usage:\n\tinit COMMAND [args...]")
os.Exit(1)
}
cmd := exec.Command(os.Args[1], os.Args[2:]...)
Expand Down

0 comments on commit 8815c8d

Please sign in to comment.