Creazione automatica di un file di log per inviare quesiti al forum: differenze tra le versioni

mNessun oggetto della modifica
Riga 679: Riga 679:


function _demone {
function _demone {
   local vers=""
   local vers="" stringa
   nome_e_riga "$2"
   nome_e_riga "$2"
   if [ -f $1 ]; then
   if [ -f $1 ]; then
Riga 686: Riga 686:
/usr/sbin/wicd)            vers=`wicd -h | head -2 | tail -1` ;;
/usr/sbin/wicd)            vers=`wicd -h | head -2 | tail -1` ;;
     esac
     esac
      
 
     $1=${1,,} # parametro in lettere minuscole
 
     echo "$2 è installato (versione "$vers")" >> $log && _ok "$2"
     echo "$2 è installato (versione "$vers")" >> $log && _ok "$2"
     invoke-rc.d --quiet $1 status
     invoke-rc.d --quiet ${1##*/} status #  ${1##*/} parametro $1 depurato dal path
     if [ $? -eq 0 ]; then
     if [ $? -eq 0 ]; then
       echo "$2 è in esecuzione" >> $log
       echo "$2 è in esecuzione" >> $log
6 999

contributi