Luka Vandervelden
46eb8fa9c4
Exception catching.
2019-10-24 12:59:19 +02:00
Luka Vandervelden
925a8ee0fd
`service status`: improved UI
2019-10-24 12:55:30 +02:00
Luka Vandervelden
efc31bac79
Templates installed in sharedir.
2019-10-24 12:53:18 +02:00
Philippe PITTOLI
79e2b3253c
Merge branch 'master' of ssh://git.karchnu.fr:2202/WeirdOS/service
2019-10-24 12:04:19 +02:00
Philippe PITTOLI
b4b5754e7c
Postgresql user and database creation script.
2019-10-24 12:03:40 +02:00
Luka Vandervelden
f9ad890e05
Installed files have better permissions.
...
Requires build.zsh 0.4.0.
2019-10-24 00:48:20 +02:00
Luka Vandervelden
f40dbccc1f
Template directories are Makefile-configured.
2019-10-24 00:41:55 +02:00
Luka Vandervelden
0c3a61f58d
Templates are Makefile-installed.
2019-10-24 00:41:34 +02:00
Luka Vandervelden
75d5fd7874
`status` can take several parameters or none.
2019-10-23 19:38:08 +02:00
Philippe PITTOLI
7f9bd275b1
postgresql (spec + template)
2019-10-22 18:33:51 +02:00
Luka Vandervelden
6a0e35eecf
gen-config binary added.
2019-10-20 18:09:43 +02:00
Luka Vandervelden
2dfcfcb979
Updates for configuration generation.
2019-10-20 18:05:31 +02:00
Luka Vandervelden
6237a9bb10
PID directory created as needed.
2019-10-19 18:43:40 +02:00
Luka Vandervelden
365e780055
Does not raise on missing directories.
2019-10-19 18:40:47 +02:00
Luka Vandervelden
794ffe16fa
Bugfixes related to a dependency’s API changes.
2019-10-19 18:24:38 +02:00
Luka Vandervelden
ca013e37d8
More stuff gets installed through `make install`.
2019-10-19 18:17:50 +02:00
Luka Vandervelden
3c20783f91
Updated dependencies and code for new Crystal version.
2019-10-19 18:08:34 +02:00
Luka Vandervelden
1c87371196
shard.yml: dependencies update
2019-10-19 18:04:40 +02:00
Luka Vandervelden
c042a8eb84
CACHE_DIRECTORY in config.cr.
2019-10-19 18:01:29 +02:00
Luka Vandervelden
75e500adcf
SpecFileParser update.
2019-08-15 17:29:52 +02:00
Luka Vandervelden
4eefe465f4
Providers are auto-guessed when adding services.
2019-08-10 22:29:11 +02:00
Luka Vandervelden
9e7921a803
`service add` can be specified token providers.
2019-08-10 22:02:11 +02:00
Luka Vandervelden
efe2c0e964
Complete removal of YAML files.
2019-08-10 17:16:24 +02:00
Luka Vandervelden
3769303ad5
WIP support for .spec service files.
2019-08-08 17:12:23 +02:00
Luka Vandervelden
2e57922ffd
Example (and test) service files added.
2019-07-08 02:59:01 +02:00
Luka Vandervelden
5dd27e1101
Priviledges management.
...
- `service status` does not require priviledges anymore… if the
`status` binary is owned by root and has the setuid and setguid
flags. Hopefully, that binary only checks that a service’s process
exists.
2019-06-10 14:32:30 +02:00
Luka Vandervelden
fbeece112a
Bugfix.
...
Bug was revealed through manual integration testing. Checks used to be
ran as unpriviledged user instead of the actual service command (duh~).
2019-06-10 00:39:15 +02:00
Luka Vandervelden
15aa28ea86
errno errors reported as such.
2019-06-10 00:38:54 +02:00
Luka Vandervelden
38329bb15e
project.zsh added and generated configuration.
2019-06-09 23:35:34 +02:00
Luka Vandervelden
5eb0849abd
Project organisation for WIP separate binaries.
...
- The idea would be to allow running specific commands from SUID
binaries when unpriviledged users should be able to run them. Such
commands include getting services status, which need root
priviledges to be implemented but shouldn’t be required by users.
- Because the repository now builds several binaries, src/main.cr is
now src/service.cr and a WIP src/status.cr has been added.
- The `status` binary will likely be installed in libexec in the
future, with the SUID bit set.
2019-06-09 18:08:59 +02:00
Luka Vandervelden
8a6829d803
Running daemons as a different user is now possible.
2019-06-09 17:14:18 +02:00
Luka Vandervelden
61c9f33f89
Sources split.
2019-06-09 16:59:05 +02:00
Luka Vandervelden
21f8d2d7d2
Service definitions can export environment variables.
2019-06-09 15:20:36 +02:00
Luka Vandervelden
5b864dcb58
evaluate()’s substitutions are now global.
2019-06-09 15:09:30 +02:00
Luka Vandervelden
73abf06a65
Improved checks.
...
- Environments can have checks, that are run before the service’s
checks.
- Directories can now be checked as well as files.
- Failing checks now stop the start process with a Service::Exception.
- Some variable substitution is done in check commands and tests.
- Some environment variables related to the environment to run the
service in are also exported.
2019-06-09 14:54:34 +02:00
Luka Vandervelden
b17a258bc8
Improved error management on environment reading.
2019-06-09 13:51:29 +02:00
Luka Vandervelden
52e4bce548
“Native” environment type renamed to “Prefix”.
2019-06-09 13:50:49 +02:00
Luka Vandervelden
0378d43224
Pre-start checks/scripts can be defined.
2019-06-09 02:22:58 +02:00
Luka Vandervelden
5aadf3c7ed
Service#summary cleaned a bit.
...
Not provided tokens will also be printed in red.
2019-06-08 19:24:52 +02:00
Luka Vandervelden
9a93937176
Grooming.
...
- Service#running?(pid_dir) added.
- No attempt to stop services not running is being made by `stop`
anymore.
2019-06-08 19:12:23 +02:00
Luka Vandervelden
e331828c8b
Reverse dependency tree.
...
- `stop` uses it to stop services that depend upon something that has
to be stopped.
2019-06-08 19:01:31 +02:00
Luka Vandervelden
dddf285046
UI update.
...
- `start` and `stop` now take service ids in parameter and can take
multiple of them.
- Errors are displayed properly (instead of “index out of bounds” or
“nil assertion failed”) when invalid ids are provided on the CLI for
`start` and `stop`.
2019-06-08 18:46:53 +02:00
Luka Vandervelden
3e8a1d2ab2
Grooming related to side-effects directories.
2019-06-08 18:25:08 +02:00
Luka Vandervelden
f858a9aa11
Dependency trees.
...
- Were tested for `start` and seem to work fine with them.
- `stop` still ignores them compteley at the moment. We’ll need to
remember what has been started as a dependency and what has not to
make `stop` work with reverse-dependency-trees.
2019-06-08 18:16:23 +02:00
Luka Vandervelden
36668ed148
Application name in help messages.
2019-06-08 03:06:26 +02:00
Luka Vandervelden
69ecadaefd
TODOs and --help.
2019-06-08 03:04:11 +02:00
Luka Vandervelden
efde03eb79
Internal improvements related to PID files.
2019-06-08 02:50:38 +02:00
Luka Vandervelden
c77d931493
shard.yml and test .empty files added.
2019-06-08 02:33:14 +02:00
Luka Vandervelden
2dd3fe7dd6
Initial commit.
2019-06-08 02:21:31 +02:00