add default & remove bash

This commit is contained in:
will Farrell
2017-01-22 12:32:01 -07:00
parent fd20e0227f
commit 6d04eaf0b0
3 changed files with 7 additions and 11 deletions

6
ping
View File

@@ -1,4 +1,4 @@
#!/bin/bash
echo ping $HOSTNAME every $TIMEOUT sec
#!/bin/sh
echo ping ${HOSTNAME:=localhost} every ${TIMEOUT:=300} sec
while true; do ping -c 1 $HOSTNAME; sleep $TIMEOUT; done;
while true; do ping -c 1 ${HOSTNAME}; sleep ${TIMEOUT}; done;