(command.CommandList
  children: [
    (C {<Id.KW_Set set>} {<-e>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:DAEMON)
          op: assign_op.Equal
          rhs: {<'/usr/bin/rsync'>}
          spids: [50]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:RSYNC_ENABLE)
          op: assign_op.Equal
          rhs: {<false>}
          spids: [53]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:RSYNC_OPTS)
          op: assign_op.Equal
          rhs: {(SQ )}
          spids: [56]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:RSYNC_DEFAULTS_FILE)
          op: assign_op.Equal
          rhs: {<'/etc/default/rsync'>}
          spids: [60]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:RSYNC_CONFIG_FILE)
          op: assign_op.Equal
          rhs: {<'/etc/rsyncd.conf'>}
          spids: [63]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:RSYNC_PID_FILE)
          op: assign_op.Equal
          rhs: {<'/var/run/rsync.pid'>}
          spids: [66]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:RSYNC_NICE_PARM)
          op: assign_op.Equal
          rhs: {(SQ )}
          spids: [69]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:RSYNC_IONICE_PARM)
          op: assign_op.Equal
          rhs: {(SQ )}
          spids: [73]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {<test>} {<-x>} {($ Id.VSub_DollarName '$DAEMON')})
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
      ]
    )
    (C {<.>} {<'/lib/lsb/init-functions'>})
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<-s>} {($ Id.VSub_DollarName '$RSYNC_DEFAULTS_FILE')} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<.>} {($ Id.VSub_DollarName '$RSYNC_DEFAULTS_FILE')})
            (command.Case
              to_match: {(DQ <x> ($ Id.VSub_DollarName '$RSYNC_ENABLE'))}
              arms: [
                (case_arm pat_list:[{<xtrue>} {<xfalse>}] spids:[125 128 130 -1])
                (case_arm
                  pat_list: [{<xinetd>}]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})]
                  spids: [133 134 141 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [
                    (C {<log_failure_msg>} 
                      {
                        (DQ <'Value of RSYNC_ENABLE in '> 
                          ($ Id.VSub_DollarName '$RSYNC_DEFAULTS_FILE') <' must be either \'true\' or \'false\';'>
                        )
                      }
                    )
                    (C {<log_failure_msg>} {(DQ <'not starting rsync daemon.'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [144 145 168 -1]
                )
              ]
            )
            (command.Case
              to_match: {(DQ <x> ($ Id.VSub_DollarName '$RSYNC_NICE'))}
              arms: [
                (case_arm
                  pat_list: [
                    {<Id.Lit_ArrayLhsOpen 'x['> <0-9> <Id.Lit_RBracket ']'>}
                    {<Id.Lit_ArrayLhsOpen 'x1['> <0-9> <Id.Lit_RBracket ']'>}
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:RSYNC_NICE_PARM)
                          op: assign_op.Equal
                          rhs: {(DQ <'--nicelevel '> ($ Id.VSub_DollarName '$RSYNC_NICE'))}
                          spids: [193]
                        )
                      ]
                    )
                  ]
                  spids: [184 191 198 -1]
                )
                (case_arm pat_list:[{<x>}] spids:[201 202 204 -1])
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [
                    (C {<log_warning_msg>} 
                      {
                        (DQ <'Value of RSYNC_NICE in '> ($ Id.VSub_DollarName '$RSYNC_DEFAULTS_FILE') 
                          <' must be a value between 0 and 19 (inclusive);'>
                        )
                      }
                    )
                    (C {<log_warning_msg>} {(DQ <'ignoring RSYNC_NICE now.'>)})
                  ]
                  spids: [207 208 226 -1]
                )
              ]
            )
            (command.Case
              to_match: {(DQ <x> ($ Id.VSub_DollarName '$RSYNC_IONICE'))}
              arms: [
                (case_arm
                  pat_list: [
                    {<x-c> <Id.Lit_LBracket '['> <123> <Id.Lit_RBracket ']'> <Id.Lit_Star '*'>}
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:RSYNC_IONICE_PARM)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName '$RSYNC_IONICE'))}
                          spids: [249]
                        )
                      ]
                    )
                  ]
                  spids: [242 247 253 -1]
                )
                (case_arm pat_list:[{<x>}] spids:[256 257 259 -1])
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [
                    (C {<log_warning_msg>} 
                      {
                        (DQ <'Value of RSYNC_IONICE in '> 
                          ($ Id.VSub_DollarName '$RSYNC_DEFAULTS_FILE') <' must be -c1, -c2 or -c3;'>
                        )
                      }
                    )
                    (C {<log_warning_msg>} {(DQ <'ignoring RSYNC_IONICE now.'>)})
                  ]
                  spids: [262 263 281 -1]
                )
              ]
            )
          ]
          spids: [96 107]
        )
      ]
    )
    (C {<export>} 
      {<Id.Lit_VarLike 'PATH='> 
        (DQ 
          (braced_var_sub
            token: <Id.VSub_Name PATH>
            suffix_op: 
              (suffix_op.Unary
                op_id: Id.VTest_ColonPlus
                arg_word: {($ Id.VSub_DollarName '$PATH') <':'>}
              )
          ) <'/usr/sbin:/sbin'>
        )
      }
    )
    (command.ShFunction
      name: rsync_start
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-s>} 
                              {(DQ ($ Id.VSub_DollarName '$RSYNC_CONFIG_FILE'))} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<log_failure_msg>} 
                      {
                        (DQ <'missing or empty config file '> 
                          ($ Id.VSub_DollarName '$RSYNC_CONFIG_FILE')
                        )
                      }
                    )
                    (C {<log_end_msg>} {<1>})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [310 325]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.AndOr
                              ops: [Id.Op_DAmp Id.Op_DAmp]
                              children: [
                                (C {<Id.Lit_LBracket '['>} {<-n>} 
                                  {(DQ ($ Id.VSub_DollarName '$RSYNC_IONICE_PARM'))} {<Id.Lit_RBracket ']'>}
                                )
                                (C {<Id.Lit_LBracket '['>} {<-x>} {<'/usr/bin/ionice'>} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                                (command.Simple
                                  words: [
                                    {<'/usr/bin/ionice'>}
                                    {(DQ ($ Id.VSub_DollarName '$RSYNC_IONICE_PARM'))}
                                    {<true>}
                                  ]
                                  redirects: [
                                    (redir
                                      op: <Id.Redir_Great '2>'>
                                      loc: (redir_loc.Fd fd:2)
                                      arg: {<'/dev/null'>}
                                    )
                                  ]
                                  do_fork: T
                                )
                              ]
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Simple
                      words: [
                        {<'/usr/bin/ionice'>}
                        {(DQ ($ Id.VSub_DollarName '$RSYNC_IONICE_PARM'))}
                        {<-p> ($ Id.VSub_Dollar '$$')}
                      ]
                      redirects: [
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<'/dev/null'>}
                        )
                        (redir
                          op: <Id.Redir_GreatAnd '2>&'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<1>}
                        )
                      ]
                      do_fork: T
                    )
                  ]
                  spids: [353 390]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<start-stop-daemon>} {<--start>} {<--quiet>} {<--background>} {<--pidfile>} 
                          {($ Id.VSub_DollarName '$RSYNC_PID_FILE')} {<--make-pidfile>} {($ Id.VSub_DollarName '$RSYNC_NICE_PARM')} {<--exec>} 
                          {($ Id.VSub_DollarName '$DAEMON')} {<-->} {<--no-detach>} {<--daemon>} {<--config>} {(DQ ($ Id.VSub_DollarName '$RSYNC_CONFIG_FILE'))} 
                          {($ Id.VSub_DollarName '$RSYNC_OPTS')}
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:rc)
                          op: assign_op.Equal
                          rhs: {<0>}
                          spids: [459]
                        )
                      ]
                    )
                    (C {<sleep>} {<1>})
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Pipeline
                                      children: [
                                        (command.Simple
                                          words: [
                                            {<kill>}
                                            {<-0>}
                                            {
                                              (command_sub
                                                left_token: <Id.Left_DollarParen '$('>
                                                child: 
                                                  (C {<cat>} {($ Id.VSub_DollarName '$RSYNC_PID_FILE')})
                                              )
                                            }
                                          ]
                                          redirects: [
                                            (redir
                                              op: <Id.Redir_Great '>'>
                                              loc: (redir_loc.Fd fd:1)
                                              arg: {<'/dev/null'>}
                                            )
                                            (redir
                                              op: <Id.Redir_GreatAnd '2>&'>
                                              loc: (redir_loc.Fd fd:2)
                                              arg: {<1>}
                                            )
                                          ]
                                          do_fork: T
                                        )
                                      ]
                                      negated: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<log_failure_msg>} {(DQ <'rsync daemon failed to start'>)})
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:rc)
                                  op: assign_op.Equal
                                  rhs: {<1>}
                                  spids: [499]
                                )
                              ]
                            )
                          ]
                          spids: [468 489]
                        )
                      ]
                    )
                  ]
                  spids: [413 456]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:rc)
                      op: assign_op.Equal
                      rhs: {<1>}
                      spids: [509]
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$rc')} {<-eq>} {<0>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<log_end_msg>} {<0>})]
                  spids: [516 529]
                )
              ]
              else_action: [
                (C {<log_end_msg>} {<1>})
                (C {<rm>} {<-f>} {($ Id.VSub_DollarName '$RSYNC_PID_FILE')})
              ]
            )
          ]
        )
    )
    (command.Case
      to_match: {(DQ ($ Id.VSub_Number '$1'))}
      arms: [
        (case_arm
          pat_list: [{<start>}]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: (C {(DQ ($ Id.VSub_DollarName '$RSYNC_ENABLE'))})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<log_daemon_msg>} {(DQ <'Starting rsync daemon'>)} {(DQ <rsync>)})
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.AndOr
                                      ops: [Id.Op_DAmp]
                                      children: [
                                        (C {<Id.Lit_LBracket '['>} {<-s>} 
                                          {($ Id.VSub_DollarName '$RSYNC_PID_FILE')} {<Id.Lit_RBracket ']'>}
                                        )
                                        (command.Simple
                                          words: [
                                            {<kill>}
                                            {<-0>}
                                            {
                                              (command_sub
                                                left_token: <Id.Left_DollarParen '$('>
                                                child: 
                                                  (C {<cat>} {($ Id.VSub_DollarName '$RSYNC_PID_FILE')})
                                              )
                                            }
                                          ]
                                          redirects: [
                                            (redir
                                              op: <Id.Redir_Great '>'>
                                              loc: (redir_loc.Fd fd:1)
                                              arg: {<'/dev/null'>}
                                            )
                                            (redir
                                              op: <Id.Redir_GreatAnd '2>&'>
                                              loc: (redir_loc.Fd fd:2)
                                              arg: {<1>}
                                            )
                                          ]
                                          do_fork: T
                                        )
                                      ]
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<log_progress_msg>} {(DQ <'apparently already running'>)})
                            (C {<log_end_msg>} {<0>})
                            (command.ControlFlow
                              token: <Id.ControlFlow_Exit exit>
                              arg_word: {<0>}
                            )
                          ]
                          spids: [595 624]
                        )
                      ]
                    )
                    (C {<rsync_start>})
                  ]
                  spids: [574 581]
                )
              ]
              else_action: [
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<-s>} 
                                  {(DQ ($ Id.VSub_DollarName '$RSYNC_CONFIG_FILE'))} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$VERBOSE'))} 
                              {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<no>} {<Id.Lit_RBracket ']'>}
                            )
                            (C {<log_warning_msg>} 
                              {
                                (DQ <'rsync daemon not enabled in '> 
                                  ($ Id.VSub_DollarName '$RSYNC_DEFAULTS_FILE') <', not starting...'>
                                )
                              }
                            )
                          ]
                        )
                      ]
                      spids: [653 666]
                    )
                  ]
                )
              ]
            )
          ]
          spids: [570 571 699 -1]
        )
        (case_arm
          pat_list: [{<stop>}]
          action: [
            (C {<log_daemon_msg>} {(DQ <'Stopping rsync daemon'>)} {(DQ <rsync>)})
            (C {<start-stop-daemon>} {<--stop>} {<--quiet>} {<--oknodo>} {<--pidfile>} 
              {($ Id.VSub_DollarName '$RSYNC_PID_FILE')}
            )
            (C {<log_end_msg>} {($ Id.VSub_QMark '$?')})
            (C {<rm>} {<-f>} {($ Id.VSub_DollarName '$RSYNC_PID_FILE')})
          ]
          spids: [702 703 742 -1]
        )
        (case_arm
          pat_list: [{<reload>} {<force-reload>}]
          action: [
            (C {<log_warning_msg>} {(DQ <'Reloading rsync daemon: not needed, as the daemon'>)})
            (C {<log_warning_msg>} {(DQ <'re-reads the config file whenever a client connects.'>)})
          ]
          spids: [746 749 766 -1]
        )
        (case_arm
          pat_list: [{<restart>}]
          action: [
            (C {<Id.KW_Set set>} {<Id.Lit_Other '+'> <e>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: (C {($ Id.VSub_DollarName '$RSYNC_ENABLE')})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<log_daemon_msg>} {(DQ <'Restarting rsync daemon'>)} {(DQ <rsync>)})
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.AndOr
                                      ops: [Id.Op_DAmp]
                                      children: [
                                        (C {<Id.Lit_LBracket '['>} {<-s>} 
                                          {($ Id.VSub_DollarName '$RSYNC_PID_FILE')} {<Id.Lit_RBracket ']'>}
                                        )
                                        (command.Simple
                                          words: [
                                            {<kill>}
                                            {<-0>}
                                            {
                                              (command_sub
                                                left_token: <Id.Left_DollarParen '$('>
                                                child: 
                                                  (C {<cat>} {($ Id.VSub_DollarName '$RSYNC_PID_FILE')})
                                              )
                                            }
                                          ]
                                          redirects: [
                                            (redir
                                              op: <Id.Redir_Great '>'>
                                              loc: (redir_loc.Fd fd:1)
                                              arg: {<'/dev/null'>}
                                            )
                                            (redir
                                              op: <Id.Redir_GreatAnd '2>&'>
                                              loc: (redir_loc.Fd fd:2)
                                              arg: {<1>}
                                            )
                                          ]
                                          do_fork: T
                                        )
                                      ]
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [
                                (C {<start-stop-daemon>} {<--stop>} {<--quiet>} {<--oknodo>} {<--pidfile>} 
                                  {($ Id.VSub_DollarName '$RSYNC_PID_FILE')}
                                )
                                (C {<true>})
                              ]
                            )
                            (C {<sleep>} {<1>})
                          ]
                          spids: [799 828]
                        )
                      ]
                      else_action: [
                        (C {<log_warning_msg>} {(DQ <'rsync daemon not running, attempting to start.'>)})
                        (C {<rm>} {<-f>} {($ Id.VSub_DollarName '$RSYNC_PID_FILE')})
                      ]
                    )
                    (C {<rsync_start>})
                  ]
                  spids: [780 785]
                )
              ]
              else_action: [
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<-s>} 
                                  {(DQ ($ Id.VSub_DollarName '$RSYNC_CONFIG_FILE'))} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$VERBOSE'))} 
                              {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<no>} {<Id.Lit_RBracket ']'>}
                            )
                            (C {<log_warning_msg>} 
                              {
                                (DQ <'rsync daemon not enabled in '> 
                                  ($ Id.VSub_DollarName '$RSYNC_DEFAULTS_FILE') <', not starting...'>
                                )
                              }
                            )
                          ]
                        )
                      ]
                      spids: [879 892]
                    )
                  ]
                )
              ]
            )
          ]
          spids: [770 771 925 -1]
        )
        (case_arm
          pat_list: [{<status>}]
          action: [
            (C {<status_of_proc>} {<-p>} {($ Id.VSub_DollarName '$RSYNC_PID_FILE')} 
              {(DQ ($ Id.VSub_DollarName '$DAEMON'))} {<rsync>}
            )
            (command.ControlFlow
              token: <Id.ControlFlow_Exit exit>
              arg_word: {($ Id.VSub_QMark '$?')}
            )
          ]
          spids: [929 930 954 -1]
        )
        (case_arm
          pat_list: [{<Id.Lit_Star '*'>}]
          action: [
            (C {<echo>} 
              {(DQ <'Usage: /etc/init.d/rsync {start|stop|reload|force-reload|restart|status}'>)}
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [957 958 -1 972]
        )
      ]
    )
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)