diff --git a/wol/scripts/wakeonlanservice.sh b/wol/scripts/wakeonlanservice.sh index 48fdc1f3ddac5a1b27eceb619734653d65c74f0e..b04dc49f780982dc3471047946b4efe24bdb08c4 100755 --- a/wol/scripts/wakeonlanservice.sh +++ b/wol/scripts/wakeonlanservice.sh @@ -18,7 +18,7 @@ getip(){ awk '/^lease/{IP=$2} /hardware ethernet/{gsub(";","",$3);if($3 == "'$1'"){print IP}}' \ - | sort -u < /var/lib/dhcp/dhcpd.leases + < /var/lib/dhcp/dhcpd.leases } # $1 : file|stdin @@ -105,7 +105,7 @@ do IPS=$(getip $mac | sed -e 's/ /,/g') for ip in $IPS do - ssh $ip "reboot" + nohup ssh $ip "reboot" & done echo "Redémarrage demandé, attendez une à deux minutes avant d'essayer de vous connecter" | answer fi diff --git a/wol/www/index.php b/wol/www/index.php index 82c29f489a562abb2a839e77d1583c51a3c3e12e..f060af1f552f711e8d76141da8179f3aba18af5d 100644 --- a/wol/www/index.php +++ b/wol/www/index.php @@ -140,7 +140,7 @@ if(!isset($action)){ ?> <form action="index.php" method="post"> <input type="hidden" name="action" value="wake"> - <input type="hidden" name="name" value="<?php echo $entry[1]; ?>"> + <input type="hidden" name="mac" value="<?php echo $entry[1]; ?>"> <input type="submit" value="Démarrer" title="Démarrer la machine"> </form> <form action="index.php" method="post" onsubmit='return confirm("Êtes-vous sûr de vouloir redémarrer la machine <? echo $entry[2]; ?>");'>