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
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
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
David Oberhollenzer
d9a5736bdf
Remove some no longer needed cruft
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-23 23:00:58 +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
34f542b7cc
Seperate init specific code from utility code
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-04 14:30:16 +01:00
David Oberhollenzer
f38163772c
Add simple cron implementation
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-19 12:22:14 +02:00
David Oberhollenzer
25afc0b3d0
Remove ctrl+alt+del target, simply initiate reboot target
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-24 21:17:31 +02:00
David Oberhollenzer
056d3c8e64
Add output truncation flag
...
This commit adds a "truncate" flag that can be added to a service
description between the "tty" keyword and the path string.
If the flag is set, the output file is truncated to 0 after opening.
This probably requires some remodeling in the future as the tty keyword
no longer deals with just tty devices.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-07-22 17:57:20 +02:00
David Oberhollenzer
720220a3c3
Add flags to selectively skip fields in service files
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-22 13:41:18 +02:00
David Oberhollenzer
160cd6b6aa
Store original file name in service structure
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-22 13:41:18 +02:00
David Oberhollenzer
6642b2b2bf
Don't pre-allocate argument vector for command lines
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-11 19:45:26 +02:00
David Oberhollenzer
71d98c150f
Don't split dependencies into argument vector, keep list of strings
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-11 16:08:25 +02:00
David Oberhollenzer
67d000cdc3
Cleanup: redeuce number of allocations in rdsvc
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-11 15:05:16 +02:00
David Oberhollenzer
65d2abc3f0
Add comments to library headers
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-04 18:54:59 +02:00
David Oberhollenzer
04a23330e4
Merge preprocessing of command lines
...
- Common function for splitting string into argument vector
- Preprocess & split command lines while parsing the service file
- Specify "before" and "after" dependencies in a single line
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-04 14:58:01 +02:00
David Oberhollenzer
160ef94e8b
Add service respawn limit
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-26 00:40:28 +02:00
David Oberhollenzer
a71c92b33d
Unify naming of service to shorthand svc
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-25 12:14:06 +02:00
David Oberhollenzer
f97add9041
Add file with service enum conversion functions
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-25 01:55:08 +01:00
David Oberhollenzer
1b3b98135e
Add license headers and comments to source
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-24 22:50:28 +01:00
David Oberhollenzer
9a88f7da45
Initial commit
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-24 17:04:20 +01:00