2019-01-01 19:44:04 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [ "$3" = "latest" ]; then
|
|
|
|
echo "The latest messages logged to the QEC:"
|
|
|
|
/usr/local/bin/latest
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$3" = "time" ]; then
|
|
|
|
echo The time is...
|
|
|
|
date
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$3" = "ping" ]; then
|
|
|
|
echo "PONG!"
|
|
|
|
ping -c 5 "$2"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$3" = "fortune" ]; then
|
|
|
|
/usr/games/fortune
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$3" = "uptime" ]; then
|
|
|
|
/usr/bin/uptime
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2021-10-19 11:23:58 +00:00
|
|
|
if [ "$3" = "changelog" ]; then
|
|
|
|
head -n 30 /var/wiki/changelog.html | awk '/^ / { print $0 }'
|
|
|
|
echo " ..."
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2019-01-02 02:34:15 +00:00
|
|
|
# shellcheck source=log
|
|
|
|
# shellcheck disable=SC1091
|
2019-01-01 19:44:04 +00:00
|
|
|
. /etc/efingerd/log
|
|
|
|
|
|
|
|
cat <<EOM
|
|
|
|
QEC STATUS: ERROR
|
|
|
|
SHIP OR USER NOT DEFINED.
|
|
|
|
THIS REQUEST HAS BEEN LOGGED.
|
|
|
|
EOM
|