fixed urls in swapupdate.sh
This commit is contained in:
parent
031a43c717
commit
a6a2671bec
@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
#this script is run via cron and checks for updates to swapwatch
|
||||
#unless the conf says not to
|
||||
swapURL="http://DOMAIN.com/monitoring/swapwatch.sh"
|
||||
swapupdateURL="http://DOMAIN.com/monitoring/swapupdate.sh"
|
||||
swapURL="http://DOMAIN.com/swapwatch.sh"
|
||||
swapupdateURL="http://DOMAIN.com/swapupdate.sh"
|
||||
APPDIR="/usr/local/sw/apps/swapwatch"
|
||||
TMPDIR="/usr/local/sw/temp"
|
||||
LOGDIR="/usr/local/sw/logs"
|
||||
@ -10,14 +10,14 @@ LOGDIR="/usr/local/sw/logs"
|
||||
|
||||
################################################################################
|
||||
#if we are allowed to update
|
||||
|
||||
|
||||
if [ $update = "yes" ]
|
||||
then
|
||||
#update swapwatch.sh
|
||||
wget -O "$TMPDIR/swapwatch.tmp" $swapURL
|
||||
#only overwrite if the dl worked
|
||||
if [ "$?" -eq 0 ]
|
||||
then
|
||||
then
|
||||
#just overwrite... probably with identical data. that's fine
|
||||
mv -f "$TMPDIR/swapwatch.tmp" "$APPDIR/swapwatch.sh"
|
||||
chmod +x "$APPDIR/swapwatch.sh"
|
||||
|
Loading…
Reference in New Issue
Block a user