Code Monkey home page Code Monkey logo

Comments (6)

coolaj86 avatar coolaj86 commented on July 28, 2024 1

@lahwran Thanks for the clarification.

I agree. This should have a remove. I'd accept a PR for that, and otherwise I do want to do it... eventually, when I can carve out the time for it.

I believe that add will always rewrite the existing service file and restart the service.

I'd be open for a PR that changes this to check if the file that would be written has the same hash as the existing file and, if so skips restarting. That would also need a --force flag to override.

from serviceman.

ryanburnette avatar ryanburnette commented on July 28, 2024

I agree.

from serviceman.

ryanburnette avatar ryanburnette commented on July 28, 2024

Aj needs to move the old issues here https://git.coolaj86.com/coolaj86/go-serviceman/issues/3

from serviceman.

coolaj86 avatar coolaj86 commented on July 28, 2024

Hi Lauren,

I'm not clear on what you mean. Are you saying that you want to be able to list and remove services that weren't added by serviceman?

from serviceman.

lahwran avatar lahwran commented on July 28, 2024

no, I'm saying that I want to be able to remove/overwrite services that were added by serviceman, because I don't see a command to do that in the docs or code, unless I missed something.

Relatedly, question I forgot to test the other day and so I'm noting here until I can investigate this myself - is add:

  1. idempotent because it's a noop if the service exists,
  2. idempotent because it's a noop if service CLI config is unchanged,
  3. or not idempotent because eg it always restarts the service

Other musings, to give context as to how I came to use serviceman and create this issue:

The use case here is that ultimately I'd like to be able to use serviceman to install a user service automatically as part of a redo build target, and have that be close to the same development experience as launched-by-the-devtools development. to do that I need a way to overwrite-and-restart the service, which I would then run as something vaguely like:

npx concurrently \
    'watchexec $WATCHEXEC_IGNORE_CONFIG ./reinstall_serviceman.sh' \
    'tailfollow_serviceman_logs.sh'

(but with a lot more package version locking.)

...hmmm, further tangenting off of this, perhaps I should look into how hard it would be to modify webi to install into a virtualenv/node_modules style vendor directory... I'd also love a way to redirect stdio to a file in all cases to make tailfollow_serviceman_logs.sh a simpler script, perhaps just by modifying what I tell serviceman to launch, or maybe modify the systemd config somehow, does systemd support that? hmm...

as you can see, my thoughts on the project that needs this are not very clear right now and I have plenty of workaround options available. sor what it's worth, I see this feature as much as a "todo someday" for myself as it's a feature request for y'all. Triage according to taste, not based on any feeling of urgency from me. good chance I'll just work around it using an approach that looks vaguely like the above sketch. maybe I could even use serviceman to generate the installable thing that goes into publishable packages!

from serviceman.

ryanburnette avatar ryanburnette commented on July 28, 2024

I keep wanting this feature. Here's how I do it manually.

sudo systemctl stop myserv
sudo systemctl disable myserv
sudo rm /etc/systemd/system/myserv.service
sudo systemctl daemon-reload

from serviceman.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.