Coder Social home page Coder Social logo

Add systemd postinstall script about oasis HOT 13 OPEN

fraction avatar fraction commented on August 26, 2024
Add systemd postinstall script

from oasis.

Comments (13)

christianbundy avatar christianbundy commented on August 26, 2024 3

Super basic idea: make an "start Oasis when my computer starts" button in the settings that only appears if you have systemd. If you select that option, we install the service and enable it.

from oasis.

jedahan avatar jedahan commented on August 26, 2024 1

We could make it a node script to make it portable

from oasis.

RangerMauve avatar RangerMauve commented on August 26, 2024 1

@christianbundy Thanks for the ping! I was contemplating doing that, but I got a little spooked by getting it to work cross platform.

I had some rough times getting a similar flow working for dat-store with os-service so I gave up and left it up to users to figure out to save energy for myself. 😛

I was low key thinking of using pm2 since that's what hyperdrive-daemon does.

I mostly set up the systemd guide so that people could set up their own proxy server on a linux box somewhere.

from oasis.

christianbundy avatar christianbundy commented on August 26, 2024

This is a really interesting idea, I'd like to think about this a bit more and hear input from others.

Do you know of any similar projects that do this? I'd love to make it easier to run Oasis as a service but I'm hesitant to add unexpected files. Would this happen only on an npm --global install?

Aside: I really appreciate that your scripts respect $XDG_CONFIG_HOME and $SYSTEMD_USER_HOME, thanks for your attention to detail.

from oasis.

jedahan avatar jedahan commented on August 26, 2024

Yeah, this would only run on postinstall globally.

"scripts": {
  "postinstall": "test \"$npm_config_global\" && ./contrib/install-systemd-service.bash || true"
}

from oasis.

christianbundy avatar christianbundy commented on August 26, 2024

Would that work on Windows machines that don't have Bash? I think I'd be comfortable with this as long as it's super robust. Being able to run an SSB service in the background has been a game-changer for me, it feels really good.

from oasis.

christianbundy avatar christianbundy commented on August 26, 2024

@RangerMauve

I noticed that you recently published hyperswarm-web, and the readme has systemd instructions. Do you think it would be appropriate for that to be done automatically if someone installed globally? i.e.

npm --global install hyperswarm-web

Also, you might get a kick out of the config that @jedahan put together in #35.

from oasis.

RangerMauve avatar RangerMauve commented on August 26, 2024

I'm gonna add checking out your install scripts to my TODO list. 💜

from oasis.

christianbundy avatar christianbundy commented on August 26, 2024

Thanks for the links @RangerMauve!

Aside: Saw this today, maybe it would be easy to add a macOS integration too? 🤔

from oasis.

christianbundy avatar christianbundy commented on August 26, 2024

Just had an idea: maybe if we detect that we're on Linux we could add a button for this in the web UI? We already know how to install and enable the service with Node.js, and we could probably even make it configurable (host/port/etc). ❗

from oasis.

jedahan avatar jedahan commented on August 26, 2024

serviceman seems pretty sweet as well

from oasis.

christianbundy avatar christianbundy commented on August 26, 2024

That does look pretty sweet. I'm happy that there seem to be lots of options, but unfortunately that means lots of research.

from oasis.

christianbundy avatar christianbundy commented on August 26, 2024

Also: I think it might be nice to re-add a regular systemd config. I realized that that's what I'm using on my server to host oasis-demo 😅

from oasis.

Related Issues (20)

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.