-
Notifications
You must be signed in to change notification settings - Fork 7
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
mac:(launchd) mange the WS App as a service #153
Conversation
This change is adding a new `scripts/` folder with a shell script called `chef_workstation_app_launcher` that will control the app launcher behavior for MacOS systems. Load the app as a service: ``` $ chef_workstation_app_launcher load ``` Remove the app as a service: ``` $ chef_workstation_app_launcher remove ``` Signed-off-by: Salim Afiune <afiune@chef.io>
Show launchd information about the Chef Workstation App service. Signed-off-by: Salim Afiune <afiune@chef.io>
This change has a dependency to chef/chef-workstation-app#153 Signed-off-by: Salim Afiune <afiune@chef.io>
This change has a dependency to chef/chef-workstation-app#153 Signed-off-by: Salim Afiune <afiune@chef.io>
Launched an ad hoc build but for some reason the MacOS packages are not being |
…into afiune/chef_workstation_app_launcher
Signed-off-by: Salim Afiune <afiune@chef.io>
Signed-off-by: Salim Afiune <afiune@chef.io>
With the commit chef/chef-workstation@1637621 now the ad hoc build is passing cc/ @jonsmorrow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks clear to me. Did you get the launcher script based on anything existing?
@tyler-ball nope. I just made my own 😂 I did read the man page for the launchd daemon agent: |
Even more impressive! |
@tyler-ball I wanna disclose that, I had already thought about this launcher script Idea:
|
cat <<DOC | ||
Usage: ${PROGNAME} <subcommand> | ||
|
||
Controls the ${PRODUCTNAME} launcher behavior for MacOS systems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Controls the ${PRODUCTNAME} launcher behavior for MacOS systems. | |
Controls the ${PRODUCTNAME} launcher behavior for macOS systems. |
main() | ||
{ | ||
if ! is_darwin; then | ||
error_exit "Launcher is only available for MacOS systems" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error_exit "Launcher is only available for MacOS systems" | |
error_exit "Launcher is only available for macOS systems" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. My only comment is that it might make sense to make this generic so the api is chef_workstation_launcher load app
this way it could potentially be used for future services too. Also that's a change we could make later so long as this is never a public api.
@jonsmorrow I will change it. My only concern is that users might get confused by the name today since this is very specific for the WS App. Hopefully not 🤞 |
@afiune we could add to the help output a list of supported options or have it launch all without an argument |
@jonsmorrow it already does that 💯 |
Signed-off-by: Salim Afiune <afiune@chef.io>
This change has a dependency to chef/chef-workstation-app#153 Signed-off-by: Salim Afiune <afiune@chef.io>
Description
This change is adding a new
scripts/
folder with a shell scriptcalled
chef_workstation_app_launcher
that will control the applauncher behavior for MacOS systems.
Load the app as a service:
Remove the app as a service:
Show launchd information about the app as a service:
Usage
Signed-off-by: Salim Afiune afiune@chef.io
Related Issue
Types of changes
Checklist: