#!/bin/sh PATH=/bin:/usr/bin:/sbin:/usr/sbin . /usr/lib/libmodcgi.sh stat_begin() { echo '
' } stat_line() { status="$(/mod/etc/init.d/rc.$1 status 2> /dev/null)" case "$status" in running) color="#008000" start=0; stop=1 ;; stopped) color="#800000" start=1; stop=0 ;; none) status='none' color="#808080" start=1; stop=0 ;; *) color="#000000" start=1; stop=1 ;; esac echo ' | |
'"$1"' | '"$status"' | ' stat_button $1 start $start stat_button $1 stop $stop stat_button $1 restart $stop echo '
$(lang de:"keine statischen Pakete" en:"no static packages")
' fi stat_end sec_end } stat_dynamic() { sec_begin '$(lang de:"Dynamische Pakete" en:"Dynamic packages")' echo '$(lang de:"(noch) nicht implementiert" en:"not implemented yet")
' sec_end } cgi_begin '$(lang de:"Dienste" en:"Services")' 'daemons' view="$(echo "$QUERY_STRING" | sed -e 's/^.*view=//' -e 's/&.*$//' -e 's/\.//g')" case "$view" in "") stat_builtin stat_static stat_dynamic ;; builtin) stat_builtin ;; static) stat_static ;; dynamic) stat_dynamic ;; *) echo "$(lang de:"Fehler" en:"Error"): $(lang de:"Unbekannte Ansicht" en:"unknown view") '$view'
" ;; esac cgi_end