diff --git a/overlay/eturnalctl b/overlay/eturnalctl index 01fcac3..9895efe 100755 --- a/overlay/eturnalctl +++ b/overlay/eturnalctl @@ -32,6 +32,15 @@ config_file="${etc_dir:-/etc}/eturnalctl.cfg" # END OF CONFIGURATION SECTION. +if [ -z "${LOGS_DIRECTORY+x}" ] +then + export LOGS_DIRECTORY='/var/log/eturnal' +fi +if [ -z "${RUNTIME_DIRECTORY+x}" ] +then + export RUNTIME_DIRECTORY='/run/eturnal' +fi + unsupported='credentials upgrade downgrade @@ -154,6 +163,10 @@ then elif [ "$(id -u)" = '0' ] then cd '/' + if ! [ -d "$RUNTIME_DIRECTORY" ] + then + install -d -m 755 -o "$user" -g "$user" "$RUNTIME_DIRECTORY" + fi arg="$(printf '%s' "$*" | sed 's/[^[:alnum:][:space:]]/\\&/g')" case $(uname -s) in Linux|OpenBSD)