mirror of
https://github.com/Luzifer/arch-update.git
synced 2024-12-20 11:01:16 +00:00
Rename function to reflect there is no mail
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
96f139e421
commit
37d56f8de2
1 changed files with 6 additions and 6 deletions
|
@ -58,11 +58,6 @@ function log() { # ( message, color )
|
||||||
LOGLINES+=("$s")
|
LOGLINES+=("$s")
|
||||||
}
|
}
|
||||||
|
|
||||||
function mailResult() { # ( )
|
|
||||||
IFS=$'\n'
|
|
||||||
echo "${LOGLINES[*]}" >>/var/log/arch_update.log
|
|
||||||
}
|
|
||||||
|
|
||||||
function main() { # ( )
|
function main() { # ( )
|
||||||
log "Starting arch_update on $(hostname): $(feature "dry-run" $DRYRUN), $(feature "reboot" $REBOOT), $(feature "service-restart" $RESSVC)"
|
log "Starting arch_update on $(hostname): $(feature "dry-run" $DRYRUN), $(feature "reboot" $REBOOT), $(feature "service-restart" $RESSVC)"
|
||||||
|
|
||||||
|
@ -150,6 +145,11 @@ function main() { # ( )
|
||||||
success "Everything finished"
|
success "Everything finished"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function sendResult() { # ( )
|
||||||
|
IFS=$'\n'
|
||||||
|
echo "${LOGLINES[*]}" >>/var/log/arch_update.log
|
||||||
|
}
|
||||||
|
|
||||||
function success() { # ( message )
|
function success() { # ( message )
|
||||||
local msg="$@"
|
local msg="$@"
|
||||||
log "$msg" "${COLOR_GREEN}"
|
log "$msg" "${COLOR_GREEN}"
|
||||||
|
@ -183,5 +183,5 @@ while getopts ":nrs" o; do
|
||||||
done
|
done
|
||||||
shift $((OPTIND - 1))
|
shift $((OPTIND - 1))
|
||||||
|
|
||||||
trap mailResult EXIT
|
trap sendResult EXIT
|
||||||
main
|
main
|
||||||
|
|
Loading…
Reference in a new issue