(command.CommandList
  children: [
    (C {(set)} {(-e)})
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:DAEMON spids:[50])
          op: Equal
          rhs: {(/usr/bin/rsync)}
          spids: [50]
        )
      ]
      spids: [50]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:RSYNC_ENABLE spids:[53])
          op: Equal
          rhs: {(false)}
          spids: [53]
        )
      ]
      spids: [53]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:RSYNC_OPTS spids:[56])
          op: Equal
          rhs: {(SQ )}
          spids: [56]
        )
      ]
      spids: [56]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:RSYNC_DEFAULTS_FILE spids:[60])
          op: Equal
          rhs: {(/etc/default/rsync)}
          spids: [60]
        )
      ]
      spids: [60]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:RSYNC_CONFIG_FILE spids:[63])
          op: Equal
          rhs: {(/etc/rsyncd.conf)}
          spids: [63]
        )
      ]
      spids: [63]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:RSYNC_PID_FILE spids:[66])
          op: Equal
          rhs: {(/var/run/rsync.pid)}
          spids: [66]
        )
      ]
      spids: [66]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:RSYNC_NICE_PARM spids:[69])
          op: Equal
          rhs: {(SQ )}
          spids: [69]
        )
      ]
      spids: [69]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:RSYNC_IONICE_PARM spids:[73])
          op: Equal
          rhs: {(SQ )}
          spids: [73]
        )
      ]
      spids: [73]
    )
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (C {(test)} {(-x)} {($ VSub_DollarName '$DAEMON')})
        (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
      ]
    )
    (C {(.)} {(/lib/lsb/init-functions)})
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Lit_Other '[')} {(-s)} {($ VSub_DollarName '$RSYNC_DEFAULTS_FILE')} 
                  {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(.)} {($ VSub_DollarName '$RSYNC_DEFAULTS_FILE')})
            (command.Case
              to_match: {(DQ (x) ($ VSub_DollarName '$RSYNC_ENABLE'))}
              arms: [
                (case_arm
                  pat_list: [{(xtrue)} {(xfalse)}]
                  spids: [125 128 130 16777215]
                )
                (case_arm
                  pat_list: [{(xinetd)}]
                  action: [(command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})]
                  spids: [133 134 141 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [
                    (C {(log_failure_msg)} 
                      {
                        (DQ ('Value of RSYNC_ENABLE in ') ($ VSub_DollarName '$RSYNC_DEFAULTS_FILE') 
                          (" must be either 'true' or 'false';")
                        )
                      }
                    )
                    (C {(log_failure_msg)} {(DQ ('not starting rsync daemon.'))})
                    (command.ControlFlow
                      token: <ControlFlow_Exit exit>
                      arg_word: {(1)}
                    )
                  ]
                  spids: [144 145 168 16777215]
                )
              ]
              spids: [115 122 171]
            )
            (command.Case
              to_match: {(DQ (x) ($ VSub_DollarName '$RSYNC_NICE'))}
              arms: [
                (case_arm
                  pat_list: [
                    {(Lit_ArrayLhsOpen 'x[') (0-9) (Lit_Other ']')}
                    {(Lit_ArrayLhsOpen 'x1[') (0-9) (Lit_Other ']')}
                  ]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:RSYNC_NICE_PARM spids:[193])
                          op: Equal
                          rhs: {(DQ ('--nicelevel ') ($ VSub_DollarName '$RSYNC_NICE'))}
                          spids: [193]
                        )
                      ]
                      spids: [193]
                    )
                  ]
                  spids: [184 191 198 16777215]
                )
                (case_arm pat_list:[{(x)}] spids:[201 202 204 16777215])
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [
                    (C {(log_warning_msg)} 
                      {
                        (DQ ('Value of RSYNC_NICE in ') ($ 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 16777215]
                )
              ]
              spids: [174 181 229]
            )
            (command.Case
              to_match: {(DQ (x) ($ VSub_DollarName '$RSYNC_IONICE'))}
              arms: [
                (case_arm
                  pat_list: [{(x-c) (Lit_Other '[') (123) (Lit_Other ']') (Lit_Other '*')}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:RSYNC_IONICE_PARM spids:[249])
                          op: Equal
                          rhs: {(DQ ($ VSub_DollarName '$RSYNC_IONICE'))}
                          spids: [249]
                        )
                      ]
                      spids: [249]
                    )
                  ]
                  spids: [242 247 253 16777215]
                )
                (case_arm pat_list:[{(x)}] spids:[256 257 259 16777215])
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [
                    (C {(log_warning_msg)} 
                      {
                        (DQ ('Value of RSYNC_IONICE in ') ($ VSub_DollarName '$RSYNC_DEFAULTS_FILE') 
                          (' must be -c1, -c2 or -c3;')
                        )
                      }
                    )
                    (C {(log_warning_msg)} {(DQ ('ignoring RSYNC_IONICE now.'))})
                  ]
                  spids: [262 263 281 16777215]
                )
              ]
              spids: [232 239 284]
            )
          ]
          spids: [16777215 107]
        )
      ]
      spids: [16777215 286]
    )
    (C {(export)} 
      {(Lit_VarLike 'PATH=') 
        (DQ 
          (word_part.BracedVarSub
            token: <VSub_Name PATH>
            suffix_op: 
              (suffix_op.StringUnary
                op_id: VTest_ColonPlus
                arg_word: {($ VSub_DollarName '$PATH') (':')}
              )
            spids: [293 298]
          ) ('/usr/sbin:/sbin')
        )
      }
    )
    (command.FuncDef
      name: rsync_start
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_Other '[')} {(KW_Bang '!')} {(-s)} 
                          {(DQ ($ VSub_DollarName '$RSYNC_CONFIG_FILE'))} {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(log_failure_msg)} 
                      {
                        (DQ ('missing or empty config file ') ($ VSub_DollarName '$RSYNC_CONFIG_FILE'))
                      }
                    )
                    (C {(log_end_msg)} {(1)})
                    (command.ControlFlow
                      token: <ControlFlow_Exit exit>
                      arg_word: {(0)}
                    )
                  ]
                  spids: [16777215 325]
                )
              ]
              spids: [16777215 346]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Op_DAmp Op_DAmp]
                          children: [
                            (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_DollarName '$RSYNC_IONICE_PARM'))} 
                              {(Lit_Other ']')}
                            )
                            (C {(Lit_Other '[')} {(-x)} {(/usr/bin/ionice)} {(Lit_Other ']')})
                            (command.SimpleCommand
                              words: [
                                {(/usr/bin/ionice)}
                                {(DQ ($ VSub_DollarName '$RSYNC_IONICE_PARM'))}
                                {(true)}
                              ]
                              redirects: [
                                (redir.Redir
                                  op: <Redir_Great '2>'>
                                  fd: 2
                                  arg_word: {(/dev/null)}
                                )
                              ]
                            )
                          ]
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.SimpleCommand
                      words: [
                        {(/usr/bin/ionice)}
                        {(DQ ($ VSub_DollarName '$RSYNC_IONICE_PARM'))}
                        {(-p) ($ VSub_Dollar '$$')}
                      ]
                      redirects: [
                        (redir.Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {(/dev/null)}
                        )
                        (redir.Redir
                          op: <Redir_GreatAnd '2>&'>
                          fd: 2
                          arg_word: {(1)}
                        )
                      ]
                    )
                  ]
                  spids: [16777215 390]
                )
              ]
              spids: [16777215 410]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (C {(start-stop-daemon)} {(--start)} {(--quiet)} {(--background)} {(--pidfile)} 
                      {($ VSub_DollarName '$RSYNC_PID_FILE')} {(--make-pidfile)} {($ VSub_DollarName '$RSYNC_NICE_PARM')} {(--exec)} {($ VSub_DollarName '$DAEMON')} 
                      {(--)} {(--no-detach)} {(--daemon)} {(--config)} {(DQ ($ VSub_DollarName '$RSYNC_CONFIG_FILE'))} 
                      {($ VSub_DollarName '$RSYNC_OPTS')}
                    )
                  ]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:rc spids:[459])
                          op: Equal
                          rhs: {(0)}
                          spids: [459]
                        )
                      ]
                      spids: [459]
                    )
                    (C {(sleep)} {(1)})
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.Pipeline
                                  children: [
                                    (command.SimpleCommand
                                      words: [
                                        {(kill)}
                                        {(-0)}
                                        {
                                          (word_part.CommandSubPart
                                            command_list: 
                                              (command.CommandList
                                                children: [
                                                  (C {(cat)} {($ VSub_DollarName '$RSYNC_PID_FILE')})
                                                ]
                                              )
                                            left_token: <Left_CommandSub '$('>
                                            spids: [476 480]
                                          )
                                        }
                                      ]
                                      redirects: [
                                        (redir.Redir
                                          op: <Redir_Great '>'>
                                          fd: 16777215
                                          arg_word: {(/dev/null)}
                                        )
                                        (redir.Redir
                                          op: <Redir_GreatAnd '2>&'>
                                          fd: 2
                                          arg_word: {(1)}
                                        )
                                      ]
                                    )
                                  ]
                                  negated: T
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C {(log_failure_msg)} {(DQ ('rsync daemon failed to start'))})
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:rc spids:[499])
                                  op: Equal
                                  rhs: {(1)}
                                  spids: [499]
                                )
                              ]
                              spids: [499]
                            )
                          ]
                          spids: [16777215 489]
                        )
                      ]
                      spids: [16777215 503]
                    )
                  ]
                  spids: [16777215 456]
                )
              ]
              else_action: [
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:rc spids:[509])
                      op: Equal
                      rhs: {(1)}
                      spids: [509]
                    )
                  ]
                  spids: [509]
                )
              ]
              spids: [506 513]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_Other '[')} {($ VSub_DollarName '$rc')} {(-eq)} {(0)} {(Lit_Other ']')})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [(C {(log_end_msg)} {(0)})]
                  spids: [16777215 529]
                )
              ]
              else_action: [
                (C {(log_end_msg)} {(1)})
                (C {(rm)} {(-f)} {($ VSub_DollarName '$RSYNC_PID_FILE')})
              ]
              spids: [537 552]
            )
          ]
          spids: [307]
        )
      spids: [303 306]
    )
    (command.Case
      to_match: {(DQ ($ VSub_Number '$1'))}
      arms: [
        (case_arm
          pat_list: [{(start)}]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {(DQ ($ VSub_DollarName '$RSYNC_ENABLE'))})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(log_daemon_msg)} {(DQ ('Starting rsync daemon'))} {(DQ (rsync))})
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.AndOr
                                  ops: [Op_DAmp]
                                  children: [
                                    (C {(Lit_Other '[')} {(-s)} {($ VSub_DollarName '$RSYNC_PID_FILE')} 
                                      {(Lit_Other ']')}
                                    )
                                    (command.SimpleCommand
                                      words: [
                                        {(kill)}
                                        {(-0)}
                                        {
                                          (word_part.CommandSubPart
                                            command_list: 
                                              (command.CommandList
                                                children: [
                                                  (C {(cat)} {($ VSub_DollarName '$RSYNC_PID_FILE')})
                                                ]
                                              )
                                            left_token: <Left_CommandSub '$('>
                                            spids: [611 615]
                                          )
                                        }
                                      ]
                                      redirects: [
                                        (redir.Redir
                                          op: <Redir_Great '>'>
                                          fd: 16777215
                                          arg_word: {(/dev/null)}
                                        )
                                        (redir.Redir
                                          op: <Redir_GreatAnd '2>&'>
                                          fd: 2
                                          arg_word: {(1)}
                                        )
                                      ]
                                    )
                                  ]
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C {(log_progress_msg)} {(DQ ('apparently already running'))})
                            (C {(log_end_msg)} {(0)})
                            (command.ControlFlow
                              token: <ControlFlow_Exit exit>
                              arg_word: {(0)}
                            )
                          ]
                          spids: [16777215 624]
                        )
                      ]
                      spids: [16777215 644]
                    )
                    (C {(rsync_start)})
                  ]
                  spids: [16777215 581]
                )
              ]
              else_action: [
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (C {(Lit_Other '[')} {(-s)} {(DQ ($ VSub_DollarName '$RSYNC_CONFIG_FILE'))} 
                              {(Lit_Other ']')}
                            )
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [
                        (command.AndOr
                          ops: [Op_DAmp]
                          children: [
                            (C {(Lit_Other '[')} {(DQ ($ VSub_DollarName '$VERBOSE'))} 
                              {(KW_Bang '!') (Lit_Other '=')} {(no)} {(Lit_Other ']')}
                            )
                            (C {(log_warning_msg)} 
                              {
                                (DQ ('rsync daemon not enabled in ') 
                                  ($ VSub_DollarName '$RSYNC_DEFAULTS_FILE') (', not starting...')
                                )
                              }
                            )
                          ]
                        )
                      ]
                      spids: [16777215 666]
                    )
                  ]
                  spids: [16777215 693]
                )
              ]
              spids: [650 696]
            )
          ]
          spids: [570 571 699 16777215]
        )
        (case_arm
          pat_list: [{(stop)}]
          action: [
            (C {(log_daemon_msg)} {(DQ ('Stopping rsync daemon'))} {(DQ (rsync))})
            (C {(start-stop-daemon)} {(--stop)} {(--quiet)} {(--oknodo)} {(--pidfile)} 
              {($ VSub_DollarName '$RSYNC_PID_FILE')}
            )
            (C {(log_end_msg)} {($ VSub_QMark '$?')})
            (C {(rm)} {(-f)} {($ VSub_DollarName '$RSYNC_PID_FILE')})
          ]
          spids: [702 703 742 16777215]
        )
        (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 16777215]
        )
        (case_arm
          pat_list: [{(restart)}]
          action: [
            (C {(set)} {(Lit_Other '+') (e)})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {($ VSub_DollarName '$RSYNC_ENABLE')})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(log_daemon_msg)} {(DQ ('Restarting rsync daemon'))} {(DQ (rsync))})
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.AndOr
                                  ops: [Op_DAmp]
                                  children: [
                                    (C {(Lit_Other '[')} {(-s)} {($ VSub_DollarName '$RSYNC_PID_FILE')} 
                                      {(Lit_Other ']')}
                                    )
                                    (command.SimpleCommand
                                      words: [
                                        {(kill)}
                                        {(-0)}
                                        {
                                          (word_part.CommandSubPart
                                            command_list: 
                                              (command.CommandList
                                                children: [
                                                  (C {(cat)} {($ VSub_DollarName '$RSYNC_PID_FILE')})
                                                ]
                                              )
                                            left_token: <Left_CommandSub '$('>
                                            spids: [815 819]
                                          )
                                        }
                                      ]
                                      redirects: [
                                        (redir.Redir
                                          op: <Redir_Great '>'>
                                          fd: 16777215
                                          arg_word: {(/dev/null)}
                                        )
                                        (redir.Redir
                                          op: <Redir_GreatAnd '2>&'>
                                          fd: 2
                                          arg_word: {(1)}
                                        )
                                      ]
                                    )
                                  ]
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (command.AndOr
                              ops: [Op_DPipe]
                              children: [
                                (C {(start-stop-daemon)} {(--stop)} {(--quiet)} {(--oknodo)} {(--pidfile)} 
                                  {($ VSub_DollarName '$RSYNC_PID_FILE')}
                                )
                                (C {(true)})
                              ]
                            )
                            (C {(sleep)} {(1)})
                          ]
                          spids: [16777215 828]
                        )
                      ]
                      else_action: [
                        (C {(log_warning_msg)} {(DQ ('rsync daemon not running, attempting to start.'))})
                        (C {(rm)} {(-f)} {($ VSub_DollarName '$RSYNC_PID_FILE')})
                      ]
                      spids: [853 870]
                    )
                    (C {(rsync_start)})
                  ]
                  spids: [16777215 785]
                )
              ]
              else_action: [
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (C {(Lit_Other '[')} {(-s)} {(DQ ($ VSub_DollarName '$RSYNC_CONFIG_FILE'))} 
                              {(Lit_Other ']')}
                            )
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [
                        (command.AndOr
                          ops: [Op_DAmp]
                          children: [
                            (C {(Lit_Other '[')} {(DQ ($ VSub_DollarName '$VERBOSE'))} 
                              {(KW_Bang '!') (Lit_Other '=')} {(no)} {(Lit_Other ']')}
                            )
                            (C {(log_warning_msg)} 
                              {
                                (DQ ('rsync daemon not enabled in ') 
                                  ($ VSub_DollarName '$RSYNC_DEFAULTS_FILE') (', not starting...')
                                )
                              }
                            )
                          ]
                        )
                      ]
                      spids: [16777215 892]
                    )
                  ]
                  spids: [16777215 919]
                )
              ]
              spids: [876 922]
            )
          ]
          spids: [770 771 925 16777215]
        )
        (case_arm
          pat_list: [{(status)}]
          action: [
            (C {(status_of_proc)} {(-p)} {($ VSub_DollarName '$RSYNC_PID_FILE')} 
              {(DQ ($ VSub_DollarName '$DAEMON'))} {(rsync)}
            )
            (command.ControlFlow
              token: <ControlFlow_Exit exit>
              arg_word: {($ VSub_QMark '$?')}
            )
          ]
          spids: [929 930 954 16777215]
        )
        (case_arm
          pat_list: [{(Lit_Other '*')}]
          action: [
            (C {(echo)} 
              {(DQ ('Usage: /etc/init.d/rsync {start|stop|reload|force-reload|restart|status}'))}
            )
            (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [957 958 16777215 972]
        )
      ]
      spids: [561 567 972]
    )
    (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
  ]
)