#!/bin/sh #------------------------------------------------------------------------------ # /usr/local/htdocs/sr.cgi - server shutdown and reboot # # Copyright (c) 2003-2010 Marcus Herleb, info(at)herleb(dot).de # Copyright (c) 2011-2024 The Eisfair Team, team(at)eisfair(dot)org # # Creation: 2003-10-11 mgh # Last Update: $Id$ # # Changes: 04.08.2004 correct escaping in the echo's - opi # add usage of sec-lib - opi # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version.. #------------------------------------------------------------------------------ halt_cmd=/sbin/halt.eis reboot_cmd=/sbin/reboot.eis SEC_REALM='server' SEC_ACTION='stop' . ./sec-lib.cgi RTIME=10 myname=`basename $0` tag=`date +%d.%m.%Y` uhr=`date +%T` . /etc/config.d/base echo "Content-Type: text/html; charset=iso-8859-1" echo "Cache-control: no-store" # HTTP/1.1 (or no-cache?) echo "Pragma: no-cache" # HTTP/1.0 echo "Expires: `date -Ru`" # Expires now! echo echo "
" echo '' echo "" echo "" if [ "$QUERY_STRING" = "stop" ] then echo "$HOSTNAME Server shutdown ..." ${halt_cmd} sleep 3 elif [ "$QUERY_STRING" = "reboot" ] then ${reboot_cmd} echo "$HOSTNAME Server wird neu gestartet..." echo "
bitte warten ....." sleep 3 fi echo "
$HOSTNAME Server ausschalten | " echo "|
$HOSTNAME Server neu starten | " echo "