Correct syntax errors in log_message calls
- Remove parentheses from log_message calls which were causing syntax errors - Add missing space in if statement condition check
This commit is contained in:
14
run.sh
14
run.sh
@@ -4,17 +4,17 @@ log_message() {
|
|||||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - $1"
|
echo "$(date '+%Y-%m-%d %H:%M:%S') - $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
log_message("Update Bunny IPs list...")
|
log_message "Update Bunny IPs list..."
|
||||||
bb -m bunny2realip.core
|
bb -m bunny2realip.core
|
||||||
|
|
||||||
if [ $? -eq 0]; then
|
if [ $? -eq 0 ]; then
|
||||||
log_message("Reload nginx configuration...")
|
log_message "Reload nginx configuration..."
|
||||||
systemctl reload nginx
|
systemctl reload nginx
|
||||||
if [ $? -eq 0]; then
|
if [ $? -eq 0 ]; then
|
||||||
log_message("Update successfully!")
|
log_message "Update successfully!"
|
||||||
else
|
else
|
||||||
log_message("nginx: Something went wrong!")
|
log_message "nginx: Something went wrong!"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
log_message("bunny2realip: Something went wrong!")
|
log_message "bunny2realip: Something went wrong!"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user