stormbot/modules/uptime/uptime.sh

6 lines
161 B
Bash
Executable File

[ -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}."