Add basic error handling to configure.sh
Some checks failed
Deploy to Wizard / Deploy (push) Failing after 2s
Some checks failed
Deploy to Wizard / Deploy (push) Failing after 2s
Add newline to end of test.sh
This commit is contained in:
parent
ab450c54f6
commit
20499ead13
@ -8,15 +8,58 @@ source /opt/vyatta/etc/functions/script-template
|
|||||||
|
|
||||||
configure
|
configure
|
||||||
|
|
||||||
source test.sh
|
echo "===== Configure firewall... ====="
|
||||||
#source firewall.sh
|
{
|
||||||
#source interfaces.sh
|
source firewall.sh
|
||||||
#source nat.sh
|
} || {
|
||||||
#source qos.sh
|
echo "===== Failed to configure firewall ====="
|
||||||
#source service.sh
|
}
|
||||||
#source system.sh
|
|
||||||
|
echo "===== Configure interfaces... ====="
|
||||||
|
{
|
||||||
|
source interfaces.sh
|
||||||
|
} || {
|
||||||
|
echo "===== Failed to configure interfaces ====="
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "===== Configure NAT... ====="
|
||||||
|
{
|
||||||
|
source nat.sh
|
||||||
|
} || {
|
||||||
|
echo "===== Failed to configure NAT ====="
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "===== Configure QoS... ====="
|
||||||
|
{
|
||||||
|
source qos.sh
|
||||||
|
} || {
|
||||||
|
echo "===== Failed to configure QoS ====="
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
echo "===== Configure services... ====="
|
||||||
|
{
|
||||||
|
source service.sh
|
||||||
|
} || {
|
||||||
|
echo "===== Failed to configure services ====="
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
echo "===== Configure system... ====="
|
||||||
|
{
|
||||||
|
source system.sh
|
||||||
|
} || {
|
||||||
|
echo "===== Failed to configure system ====="
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
compare
|
compare
|
||||||
commit
|
|
||||||
save
|
{ # try commit, save
|
||||||
exit
|
commit && save
|
||||||
|
} || { # catch, exit discard and print a very basic error message
|
||||||
|
exit discard
|
||||||
|
echo "Failed to commit and save the configuration."
|
||||||
|
}
|
||||||
|
|
||||||
|
exit
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#!/bin/vbash
|
#!/bin/vbash
|
||||||
|
|
||||||
set system task-scheduler task update-nat-reflection interval '30'
|
set system task-scheduler task update-nat-reflection interval '30'
|
||||||
|
Loading…
Reference in New Issue
Block a user