Skip to content

Commit

Permalink
bits 0xfeedf4ce (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmonsays authored Feb 24, 2024
1 parent 302880b commit 9e02bb2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ example user configuration:

Setup a service (and start it)

runitcmd setup sleep --run 'sleep 3600'
runitcmd setup --run 'sleep 3600' sleep

Stop/start service

Expand Down
13 changes: 11 additions & 2 deletions cmd/runitcmd/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ func initSetup(app *Application) *cli.Command {
usage := "setup a service"

flags := []cli.Flag{
&cli.StringFlag{
Name: "name",
Aliases: []string{"n"},
Usage: "service name",
},
&cli.BoolFlag{
Name: "verbose, v",
Usage: "be verbose",
Expand All @@ -29,8 +34,9 @@ func initSetup(app *Application) *cli.Command {
Usage: "setup service but do not enable it",
},
&cli.StringFlag{
Name: "run",
Usage: "run command",
Name: "run",
Aliases: []string{"r"},
Usage: "run command",
},
&cli.StringFlag{
Name: "log-run",
Expand Down Expand Up @@ -85,6 +91,9 @@ func (app *Application) Setup(c *cli.Context) error {

args := c.Args()
name := args.First()
if name == "" {
name = c.String("name")
}

log.Tracef("setup service-dir:%s active-dir:%s log-dir:%s",
service_dir, active_dir, log_dir)
Expand Down

0 comments on commit 9e02bb2

Please sign in to comment.