1
0
Fork 0
mirror of https://github.com/pygos/init.git synced 2024-11-22 19:19:47 +01:00
Commit graph

13 commits

Author SHA1 Message Date
1c72dd2c2f Fix remove by id
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-06-16 16:09:49 +02:00
c1cb8491f9 fix: actually remove started service from list
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-29 21:00:53 +01:00
c8c0f10ce1 Keep original respawn limit
We also want this meachanism to still work for manually started
service (especially after reloading services).

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-29 21:00:53 +01:00
028394b8a5 Add service configuration reloading
This commit add the ability to initd to reload the service configuration
while running. The new configuration is merged with the existing one as
follows:

For each target:
 - If the existing service list is not NULL, we have not started that
   target yet. Simply replace it with the new list.
 - If it is NULL, the services have already been started.
    - First, remove all entries for services in that target that no
      loner exist (except from the 'running' list).
    - Second, add new services that we don't have yet. Treat them as
      recently diseased and let the user start them manualy.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-29 21:00:53 +01:00
ba12700080 Add start/stop commands to init socket
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-28 15:32:10 +01:00
c16735414b initd: Hand out unique IDs to services
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-28 13:45:33 +01:00
d16d260181 Add filter argument to status request
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-27 17:48:32 +01:00
e21840cfce initd: don't start runsvc for services without exec block
First in rdsvc, tag the services that *do* have exec lines, even if we don't
read them.

Second, if a service does not have that flag set, don't try to execute it.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-20 15:44:14 +01:00
a9602ad6e0 Cleanup status reporting
- mimic format of initd
 - skip formatting if not a tty
 - distinguish exited because failed vs exited because done

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-18 18:47:20 +01:00
40ad83dc6a initd: implement handling of socket requests
Actually process requests and send an answer to status inquiries.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-18 18:29:02 +01:00
c544fcc7a3 initd: store completed services in list instead of deleting them
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-15 10:46:11 +01:00
David Oberhollenzer
c14c3c0173 Relicense what is left of the init system under OpenBSD style ISC license
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-23 13:16:08 +01:00
David Oberhollenzer
ec74e5bbee initd: restructure and merge service supervision code
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-24 21:17:31 +02:00