"Fossies" - the Fresh Open Source Software Archive

Member "systeminfo/report/service.sh" (4 Feb 2005, 462 Bytes) of package /linux/privat/old/systeminfov12.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 # Service Information Generator
    3 
    4 while read line; do
    5 echo $line | grep -q '<span style="font-weight:">'
    6 if [[ $? -eq 0 ]]
    7 then
    8     echo $line
    9     printf "\n<b>INIT Level : </b>`awk -F : '/^id/ { print $2 }' /etc/inittab`\n<br><br>"
   10     printf "\n<b>Services Running now :</b>\n<br><br>";
   11     service --status-all | while read ln; do
   12     [[ ! -z " " ]] && echo $ln"<br>"
   13     done
   14 else
   15     echo $line
   16 fi
   17 done < service.html > $1/service.html 2>/dev/null