Make logging base dir configurable
This commit is contained in:
parent
f9bc7405a9
commit
d5fa2e99de
2 changed files with 3 additions and 4 deletions
|
@ -4,7 +4,7 @@ Various runit service files for per-user services. May need to be modified to wo
|
||||||
|
|
||||||
Helper scripts:
|
Helper scripts:
|
||||||
- `log`: symlink as the `run` script in your service's log directory to enable
|
- `log`: symlink as the `run` script in your service's log directory to enable
|
||||||
logging to `~/.local/log/`
|
logging to `$SVLOGDIR`. If unset, defaults to `~/.local/log/`
|
||||||
- `utils/setup-supervise.zsh`: run to create symlinks for `supervise`
|
- `utils/setup-supervise.zsh`: run to create symlinks for `supervise`
|
||||||
directories, so they are created in $XDG_RUNTIME_DIR
|
directories, so they are created in $XDG_RUNTIME_DIR
|
||||||
- `utils/new-service`: create a new service, executing the given command line.
|
- `utils/new-service`: create a new service, executing the given command line.
|
||||||
|
@ -17,6 +17,5 @@ Helper scripts:
|
||||||
```sh
|
```sh
|
||||||
utils/new-service -l my-daemon --foreground -a -b -c
|
utils/new-service -l my-daemon --foreground -a -b -c
|
||||||
```
|
```
|
||||||
- `utils/svlogs`: like svlogtail for user services. Uses $SVLOGDIRS or
|
- `utils/svlogs`: like svlogtail for user services. ZSH completion file available in
|
||||||
`~/.local/log/` as base dir. ZSH completion file available in
|
|
||||||
`utils/completions`
|
`utils/completions`
|
||||||
|
|
2
log
2
log
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
SERVICE=${0:a:h:h:t}
|
SERVICE=${0:a:h:h:t}
|
||||||
LOGDIR=$HOME/.local/log/$SERVICE
|
LOGDIR=${SVLOGDIR:-$HOME/.local/log}/$SERVICE
|
||||||
mkdir -p $LOGDIR
|
mkdir -p $LOGDIR
|
||||||
exec svlogd -ttt $LOGDIR
|
exec svlogd -ttt $LOGDIR
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue