Skip to content

Support for jbang --service flag #1945

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

Open
diegolovison opened this issue Mar 14, 2025 · 2 comments
Open

Support for jbang --service flag #1945

diegolovison opened this issue Mar 14, 2025 · 2 comments
Labels
ideas Some idea/suggestion around jbang behavior/feature set

Comments

@diegolovison
Copy link

I can install myapp with the following

curl -Ls https://sh.jbang.dev | bash -s - app install --fresh --force myapp@myappio

I would like to have a new feature called --service

curl -Ls https://sh.jbang.dev | bash -s - app install --fresh --force --service myapp@myappio param param1=param2

When passing the --service flag, the system will generate a new service file at /etc/systemd/system/myapp.service. This file configures systemd to manage the application as a background service, ensuring that it starts automatically at boot and restarts if it crashes. This setup allows the software to survive system reboots and unexpected failures, improving reliability and uptime.

@diegolovison diegolovison added the ideas Some idea/suggestion around jbang behavior/feature set label Mar 14, 2025
Copy link
Collaborator

Not sure if jbang should do this as it requires root access and root wouldn't have jbang installed to run using curl.

@diegolovison
Copy link
Author

If I try to install ollama it requests the password because some script requires sudo

$ curl -fsSL https://ollama.com/install.sh | sh
>>> Installing ollama to /usr/local
[sudo] password for dlovison: 

Can jbang do the same approach when adding --service ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ideas Some idea/suggestion around jbang behavior/feature set
Projects
None yet
Development

No branches or pull requests

2 participants