(command.CommandList
  children: [
    (C {(Id.KW_Set set)} {(-e)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:PATH)
          op: assign_op.Equal
          rhs: {(DQ ('/sbin:/bin'))}
          spids: [34]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {(Id.Lit_LBracket '[')} {(-d)} {(/lib/ufw)} {(Id.Lit_RBracket ']')})
        (command.ControlFlow
          token: (Token id:Id.ControlFlow_Exit val:exit span_id:50)
          arg_word: {(0)}
        )
      ]
    )
    (C {(.)} {(/lib/lsb/init-functions)})
    (command.ForEach
      iter_name: s
      iter_words: [
        {(DQ (/lib/ufw/ufw-init-functions))}
        {(DQ (/etc/ufw/ufw.conf))}
        {(DQ (/etc/default/ufw))}
      ]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Id.Lit_LBracket '[')} {(-s)} {(DQ ($ Id.VSub_DollarName '$s'))} 
                          {(Id.Lit_RBracket ']')}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:94)
                    )
                  ]
                  action: [(C {(.)} {(DQ ($ Id.VSub_DollarName '$s'))})]
                  spids: [83 96]
                )
              ]
              else_action: [
                (C {(log_failure_msg)} 
                  {(DQ ('Could not find ') ($ Id.VSub_DollarName '$s') (' (aborting)'))}
                )
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Exit val:exit span_id:118)
                  arg_word: {(1)}
                )
              ]
            )
          ]
        )
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:error)
          op: assign_op.Equal
          rhs: {(0)}
          spids: [128]
        )
      ]
    )
    (command.Case
      to_match: {(DQ ($ Id.VSub_Number '$1'))}
      arms: [
        (case_arm
          pat_list: [{(start)}]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Id.Op_DPipe]
                          children: [
                            (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$ENABLED'))} 
                              {(Id.Lit_Equals '=')} {(DQ (yes))} {(Id.Lit_RBracket ']')}
                            )
                            (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$ENABLED'))} 
                              {(Id.Lit_Equals '=')} {(DQ (YES))} {(Id.Lit_RBracket ']')}
                            )
                          ]
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:174)
                    )
                  ]
                  action: [
                    (C {(log_action_begin_msg)} {(DQ ('Starting firewall:'))} {(DQ (ufw))})
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:output)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (command_sub
                                    left_token: (Token id:Id.Left_Backtick val:'`' span_id:191)
                                    command_list: (command.CommandList children:[(C {(ufw_start)})])
                                  )
                                }
                              spids: [190]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:error)
                              op: assign_op.Equal
                              rhs: {(DQ ($ Id.VSub_QMark '$?'))}
                              spids: [199]
                            )
                          ]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$error'))} 
                                  {(Id.Lit_Equals '=')} {(DQ (0))} {(Id.Lit_RBracket ']')}
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:220)
                            )
                          ]
                          action: [
                            (C {(log_action_cont_msg)} 
                              {
                                (DQ ('Setting kernel variables (') 
                                  ($ Id.VSub_DollarName '$IPT_SYSCTL') (')')
                                )
                              }
                            )
                          ]
                          spids: [205 222]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} 
                                  {(DQ ($ Id.VSub_DollarName '$output'))} {(Id.Lit_RBracket ']')}
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:250)
                            )
                          ]
                          action: [
                            (command.Pipeline
                              children: [
                                (C {(echo)} {(DQ ($ Id.VSub_DollarName '$output'))})
                                (command.WhileUntil
                                  keyword: (Token id:Id.KW_While val:while span_id:263)
                                  cond: [
                                    (command.Sentence
                                      child: (C {(read)} {(line)})
                                      terminator: (Token id:Id.Op_Semi val:';' span_id:269)
                                    )
                                  ]
                                  body: 
                                    (command.DoGroup
                                      children: [
                                        (C {(log_action_cont_msg)} {(DQ ($ Id.VSub_DollarName '$line'))})
                                      ]
                                    )
                                )
                              ]
                              negated: F
                            )
                          ]
                          spids: [237 252]
                        )
                      ]
                    )
                  ]
                  spids: [143 176]
                )
              ]
              else_action: [
                (C {(log_action_begin_msg)} {(DQ ('Skip starting firewall:'))} 
                  {(DQ ('ufw (not enabled)'))}
                )
              ]
            )
            (C {(log_action_end_msg)} {($ Id.VSub_DollarName '$error')})
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:309)
              arg_word: {($ Id.VSub_DollarName '$error')}
            )
          ]
          spids: [139 140 314 -1]
        )
        (case_arm
          pat_list: [{(stop)}]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Id.Op_DPipe]
                          children: [
                            (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$ENABLED'))} 
                              {(Id.Lit_Equals '=')} {(DQ (yes))} {(Id.Lit_RBracket ']')}
                            )
                            (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$ENABLED'))} 
                              {(Id.Lit_Equals '=')} {(DQ (YES))} {(Id.Lit_RBracket ']')}
                            )
                          ]
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:351)
                    )
                  ]
                  action: [
                    (C {(log_action_begin_msg)} {(DQ ('Stopping firewall:'))} {(DQ (ufw))})
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:output)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (command_sub
                                    left_token: (Token id:Id.Left_Backtick val:'`' span_id:368)
                                    command_list: (command.CommandList children:[(C {(ufw_stop)})])
                                  )
                                }
                              spids: [367]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:error)
                              op: assign_op.Equal
                              rhs: {(DQ ($ Id.VSub_QMark '$?'))}
                              spids: [376]
                            )
                          ]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} 
                                  {(DQ ($ Id.VSub_DollarName '$output'))} {(Id.Lit_RBracket ']')}
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:395)
                            )
                          ]
                          action: [(C {(log_action_cont_msg)} {(DQ ($ Id.VSub_DollarName '$output'))})]
                          spids: [382 397]
                        )
                      ]
                    )
                  ]
                  spids: [320 353]
                )
              ]
              else_action: [
                (C {(log_action_begin_msg)} {(DQ ('Skip stopping firewall:'))} 
                  {(DQ ('ufw (not enabled)'))}
                )
              ]
            )
            (C {(log_action_end_msg)} {($ Id.VSub_DollarName '$error')})
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:432)
              arg_word: {($ Id.VSub_DollarName '$error')}
            )
          ]
          spids: [316 317 437 -1]
        )
        (case_arm
          pat_list: [{(restart)} {(force-reload)}]
          action: [
            (C {(log_action_begin_msg)} {(DQ ('Reloading firewall:'))} {(DQ (ufw))})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:output)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_Backtick val:'`' span_id:457)
                            command_list: (command.CommandList children:[(C {(ufw_reload)})])
                          )
                        }
                      spids: [456]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:error)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_QMark '$?'))}
                      spids: [465]
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} 
                          {(DQ ($ Id.VSub_DollarName '$output'))} {(Id.Lit_RBracket ']')}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:484)
                    )
                  ]
                  action: [(C {(log_action_cont_msg)} {(DQ ($ Id.VSub_DollarName '$output'))})]
                  spids: [471 486]
                )
              ]
            )
            (C {(log_action_end_msg)} {($ Id.VSub_DollarName '$error')})
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:504)
              arg_word: {($ Id.VSub_DollarName '$error')}
            )
          ]
          spids: [439 442 509 -1]
        )
        (case_arm
          pat_list: [{(status)}]
          action: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:output)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_Backtick val:'`' span_id:516)
                            command_list: (command.CommandList children:[(C {(ufw_status)})])
                          )
                        }
                      spids: [515]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:error)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_QMark '$?'))}
                      spids: [524]
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} 
                          {(DQ ($ Id.VSub_DollarName '$output'))} {(Id.Lit_RBracket ']')}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:543)
                    )
                  ]
                  action: [(C {(log_action_cont_msg)} {(DQ ($ Id.VSub_DollarName '$output'))})]
                  spids: [530 545]
                )
              ]
            )
            (C {(log_action_end_msg)} {($ Id.VSub_DollarName '$error')})
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:563)
              arg_word: {($ Id.VSub_DollarName '$error')}
            )
          ]
          spids: [511 512 568 -1]
        )
        (case_arm
          pat_list: [{(Id.Lit_Star '*')}]
          action: [
            (C {(echo)} {(DQ ('Usage: /etc/init.d/ufw {start|stop|restart|force-reload|status}'))})
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:581)
              arg_word: {(1)}
            )
          ]
          spids: [570 571 586 -1]
        )
      ]
    )
    (command.ControlFlow token:(Token id:Id.ControlFlow_Exit val:exit span_id:591) arg_word:{(0)})
  ]
)