Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate windows service start parameters #250

Closed
wants to merge 1 commit into from

Conversation

msays2000
Copy link

@msays2000 msays2000 commented Nov 23, 2020

pass service start arguments via service interface

  • In windows args passed into Execute are different than os.Args()
  • In other OS, returning config.Arguments that developers can augment with or without os.Args().
$ sc.exe start
DESCRIPTION:
        Starts a service running.
USAGE:
        sc <server> start [service name] <arg1> <arg2> ...

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 15.037% when pulling 3ba183c on msays2000:serviceStartArgs into 18c957a on kardianos:master.

@msays2000
Copy link
Author

resolves : #82

@msays2000
Copy link
Author

@kardianos please review.

@kardianos
Copy link
Owner

Arguments are used when a service is "created", not when it is ran.

See: https://github.com/kardianos/service/blob/master/service_windows.go#L231

@msays2000
Copy link
Author

In windows arguments are also passed when service is "started" which is different than "created". Please propose, if I can add another property to differentiate them or merge the args

@kardianos
Copy link
Owner

I could maybe see something being added to the options bag, specifically for windows starting arguments. But in general, not a fan of the concept for this package.

@msays2000 msays2000 closed this Aug 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants