- MYPATH already defined by parent script

- Just check file exists, instead of using ls
pull/118/head
jangliss 2020-07-20 21:32:02 -05:00 zatwierdzone przez Patrick Naubert
rodzic dec779a89b
commit 14abb60472
1 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -1,7 +1,6 @@
#this installs the basic software for build-a-pi
#km4ack 20200513
MYPATH=$HOME/pi-build
TEMPCRON=$MYPATH/cron.tmp
DIR=$MYPATH/temp
mkdir -p $DIR
@ -12,8 +11,8 @@ source $MYPATH/config
# HOTSPOT
################################
HOTSPOT(){
HS=$(ls /usr/bin/ | grep autohotspotN)
if [ -z "$HS" ]; then
HS="/usr/bin/autohotspotN"
if [ ! -f "$HS" ]; then
#pass variables with script because run as root
sudo bash $MYPATH/functions/autohotspot "$SHACKSSID" "$SHACKPASS" "$HSPASS"
echo "*/5 * * * * sudo /usr/bin/autohotspotN >/dev/null 2>&1" >> $TEMPCRON