aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rwxr-xr-xsrc/bbfw.in24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/bbfw.in b/src/bbfw.in
index 288b51a..f2a5f61 100755
--- a/src/bbfw.in
+++ b/src/bbfw.in
@@ -213,8 +213,25 @@ load()
213} 213}
214 214
215 215
216restart() {
217 if test ! -d "${FW_PREFIX}";then
218 echo "${PROGRAM_NAME}: ${FW_PREFIX}: firewall directory does not exist" 1>&2
219 return 1
220 fi
221
222 stop
223 start
224}
225
226
216# Function to start the network: 227# Function to start the network:
217start() { 228start() {
229 # checks for firewall directory
230 if test ! -d "${FW_PREFIX}";then
231 echo "${PROGRAM_NAME}: ${FW_PREFIX}: firewall directory does not exist" 1>&2
232 return 1
233 fi
234
218 # run pre-hooks 235 # run pre-hooks
219 run_hook start ${FW_PREFIX}/global.d/pre-hook "running global pre-hook start ..." 236 run_hook start ${FW_PREFIX}/global.d/pre-hook "running global pre-hook start ..."
220 for FILE in $( find_appfile pre-hook );do 237 for FILE in $( find_appfile pre-hook );do
@@ -337,10 +354,6 @@ FW_QUIET="$( config_option quiet "${FW_QUIET}" A-Z a-z )"
337 354
338 355
339# checks and normalizes options 356# checks and normalizes options
340if test ! -d "${FW_PREFIX}";then
341 echo "${PROGRAM_NAME}: ${FW_PREFIX}: firewall directory does not exist" 1>&2
342 exit 1
343fi
344if test "x${FW_QUIET}" == "xno";then 357if test "x${FW_QUIET}" == "xno";then
345 unset FW_QUIET 358 unset FW_QUIET
346elsif test "x${FW_QUIET}" != "xno";then 359elsif test "x${FW_QUIET}" != "xno";then
@@ -377,8 +390,7 @@ case "$1" in
377 390
378 'restart') # "restart" restarts the network: 391 'restart') # "restart" restarts the network:
379 echo "${PACKAGE_NAME} ${PACKAGE_VERSION}" | $LOGGER 392 echo "${PACKAGE_NAME} ${PACKAGE_VERSION}" | $LOGGER
380 stop 2>&1 | $LOGGER 393 restart 2>&1 | $LOGGER
381 start 2>&1 | $LOGGER
382 ;; 394 ;;
383 395
384 *) # The default is to bring up all configured interfaces: 396 *) # The default is to bring up all configured interfaces: