- # NOTE: wait in foreground process to get the initialization status.
- $daemon_directory/master -w || {
- $FATAL "mail system startup failed"
- exit 1
- }
+ case $1 in
+ start)
+ # NOTE: wait in foreground process to get the initialization status.
+ $daemon_directory/master -w || {
+ $FATAL "mail system startup failed"
+ exit 1
+ }
+ ;;
+ start-fg)
+ # Foreground start-up is incompatible with multi-instance mode.
+ # We can't use "exec $daemon_directory/master" here: that would
+ # break process group management, and "postfix stop" would kill
+ # too many processes.
+ case $instances in
+ "") $daemon_directory/master
+ ;;
+ *) $FATAL "start-fg does not support multi_instance_directories"
+ exit 1
+ ;;
+ esac
+ ;;
+ esac