stormbot/modules/uptime/uptime.sh

6 lines
161 B
Bash
Raw Normal View History

2020-08-12 21:23:50 -04:00
[ -f functions.sh ] && source functions.sh
pid=$(pgrep bot.sh | head -1)
uptime="$(ps -p $pid -o etime | tail -1)"
msg "$2" "$1: I have been up for ${uptime}."