kopia lustrzana https://github.com/alecmuffett/eotk
commit: enhance housekeeping script slightly, and improve: eotk logsize
rodzic
ec4e406866
commit
35e49a0d4c
2
eotk
2
eotk
|
@ -485,7 +485,7 @@ case "$cmd" in
|
|||
|
||||
logsize|logsizes)
|
||||
$flag_remote || echo :::: eotk log sizes ::::
|
||||
find $EOTK_HOME -name "*.log" -ls
|
||||
find $EOTK_HOME -name "*.log" -o -name "*.log.*" -ls
|
||||
# InvokeRemotely prints remote-ness banner diags
|
||||
InvokeRemotely logsize
|
||||
;;
|
||||
|
|
|
@ -16,13 +16,19 @@
|
|||
#
|
||||
# ...a slight delay is automatically added for OnionBalance machines
|
||||
|
||||
EOTK_HOUSEKEEPING_LOG=/tmp/eotk-housekeeping.log
|
||||
DELETE_LAST_LOG=true # or: false
|
||||
|
||||
EOTK_HOME=%EOTK_HOME%
|
||||
EOTK_USER=%USER% # hardcode owner of the directory & files
|
||||
EOTK_HOUSEKEEPING_LOG=/tmp/eotk-housekeeping.log
|
||||
EOTK_OB_DELAY=90 # backgrounded pause
|
||||
|
||||
EOTK_PATH=%PATH% # freeze the path at template expansion time (not wise for init-script)
|
||||
|
||||
if $DELETE_LAST_LOG && test -f $EOTK_HOUSEKEEPING_LOG ; then
|
||||
rm $EOTK_HOUSEKEEPING_LOG || exit 1
|
||||
fi
|
||||
|
||||
exec </dev/null >>$EOTK_HOUSEKEEPING_LOG 2>&1
|
||||
|
||||
PATH="$EOTK_PATH" ; export PATH
|
||||
|
@ -43,5 +49,8 @@ if [ -d $ob_dir ] ; then
|
|||
sleep $EOTK_OB_DELAY
|
||||
fi
|
||||
|
||||
exec $EOTK_HOME/eotk --local logrotate # overlay
|
||||
exit 1
|
||||
$EOTK_HOME/eotk --local logrotate || exit 1
|
||||
|
||||
date # again
|
||||
echo done.
|
||||
exit 0
|
||||
|
|
Ładowanie…
Reference in New Issue