Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit 8607a70

Browse files
committed
#695: Emmit WARN message when expiring session.
1 parent 4e00ad3 commit 8607a70

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Diff for: src/usr/sbin/reaper

+11-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ function __print_message ()
4040
local -r type="${1}"
4141

4242
local colour_negative='\033[1;31m'
43+
local colour_notice='\033[1;33m'
4344
local colour_positive='\033[1;32m'
4445
local colour_reset='\033[0m'
4546
local exit_code="${3:-0}"
@@ -52,6 +53,7 @@ function __print_message ()
5253
then
5354
unset \
5455
colour_negative \
56+
colour_notice \
5557
colour_positive \
5658
colour_reset
5759
fi
@@ -65,6 +67,14 @@ function __print_message ()
6567
"${colour_reset}"
6668
)"
6769
;;
70+
warn)
71+
prefix="$(
72+
printf -- \
73+
'%bWARN:%b ' \
74+
"${colour_notice}" \
75+
"${colour_reset}"
76+
)"
77+
;;
6878
info)
6979
prefix="$(
7080
printf -- \
@@ -404,7 +414,7 @@ function main ()
404414
fi
405415

406416
__print_message \
407-
"info" \
417+
"warn" \
408418
"${0##*/} expiring session"
409419

410420
exit 0

0 commit comments

Comments
 (0)