Comments (5)
Do you mean changing jvehent/service-go to kardianos/service?
kardianos/service removed the NewService function, and added a service.New one, but this one takes an Interface (Start, Stop) which I have yet to figure out how to adapt to our use case.
from mig.
Yes, that's what I mean. I looked at the new interfaces from kardianos/service a while back, but the changes were more difficult to implement than I had initially anticipated. Still, it's something to look into.
from mig.
I think we might still want to fork service package, we can use the upstream version, but there are some changes that are convenient for us:
Service package allows us to "Install" a service, giving the "Start at Boot" and "Restart on Crash" capability.
The functionallity is already working on OSX and systemd as it is.
For upstart it is just a one line change
For systemv it might be more difficult (it's changing the init script)
For windows it is a few lines change (not tested yet)
I created an issue in the Service project asking to make it configurable.
from mig.
Once that is solved, the idea would be to Create the Service and Install it on the sistem, right?
Installing it in the system implies creating the corresponding file so the process is run at startup and restarts after crashes.
Should it use a flag to specify this behaviour?
from mig.
I don't think a flag is needed. The current approach is a bit brute-forcy, but works: if the process isn't currently running as a service (ppid
!=1), then do a remove->install->start service. At that point, a new process should be started as a service, and the current process that did the install exits.
from mig.
Related Issues (20)
- Implement API endpoint for documentation retrieval
- Implement API endpoint to retrieve module documentation
- Implement API endpoint for creating an action
- Implement API endpoint to dispatch a created action to the MIG API
- Implement API endpoint to check the status of a dispatched action
- Implement an action dispatch service
- Implement an action management service
- Implement API endpoints for action retrieval and adding signatures
- Deprecate mig.ninja namespace
- Feature Request: Get mig to parse ps -u output for processes run by specific usernames
- Client daemon fails to build with Yara module support
- Add options for gathering LLDP information via the netstat module HOT 2
- x509 Module HOT 1
- Kubernetes agent deployment
- Move all documentation over to markdown HOT 5
- Results count should indicate from how many systems
- SystemD unit file doesn't get updated when a new agent is installed
- Email address in Makefile is <noreply@> rather than something useful
- CODE_OF_CONDUCT.md file missing
- Ownership Transfer HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mig.