(CommandList
  children: [
    (C {(set)} {(-e)})
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LeftVar name:DAEMON) rhs:{(/usr/bin/rsync)} spids:[50])]
      spids: [50]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LeftVar name:RSYNC_ENABLE) rhs:{(false)} spids:[53])]
      spids: [53]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LeftVar name:RSYNC_OPTS) rhs:{(SQ )} spids:[56])]
      spids: [56]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LeftVar name:RSYNC_DEFAULTS_FILE)
          rhs: {(/etc/default/rsync)}
          spids: [60]
        )
      ]
      spids: [60]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LeftVar name:RSYNC_CONFIG_FILE) rhs:{(/etc/rsyncd.conf)} spids:[63])]
      spids: [63]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LeftVar name:RSYNC_PID_FILE) rhs:{(/var/run/rsync.pid)} spids:[66])]
      spids: [66]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LeftVar name:RSYNC_NICE_PARM) rhs:{(SQ )} spids:[69])]
      spids: [69]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LeftVar name:RSYNC_IONICE_PARM) rhs:{(SQ )} spids:[73])]
      spids: [73]
    )
    (AndOr
      children: [(C {(test)} {(-x)} {($ VSub_Name "$DAEMON")}) (C {(exit)} {(0)})]
      op_id: Op_DPipe
    )
    (C {(.)} {(/lib/lsb/init-functions)})
    (If
      arms: [
        (if_arm
          cond: 
            (Sentence
              command: 
                (C {(Lit_Other "[")} {(-s)} {($ VSub_Name "$RSYNC_DEFAULTS_FILE")} {(Lit_Other "]")})
              terminator: <Op_Semi ";">
            )
          action: 
            (CommandList
              children: [
                (C {(.)} {($ VSub_Name "$RSYNC_DEFAULTS_FILE")})
                (Case
                  to_match: {(DQ (x) ($ VSub_Name "$RSYNC_ENABLE"))}
                  arms: [
                    (case_arm
                      pat_list: [{(xtrue)} {(xfalse)}]
                      action: (NoOp)
                      spids: [125 128 130 -1]
                    )
                    (case_arm
                      pat_list: [{(xinetd)}]
                      action: (C {(exit)} {(0)})
                      spids: [133 134 141 -1]
                    )
                    (case_arm
                      pat_list: [{(Lit_Other "*")}]
                      action: 
                        (CommandList
                          children: [
                            (C {(log_failure_msg)} 
                              {
                                (DQ ("Value of RSYNC_ENABLE in ") ($ VSub_Name "$RSYNC_DEFAULTS_FILE") 
                                  (" must be either 'true' or 'false';")
                                )
                              }
                            )
                            (C {(log_failure_msg)} {(DQ ("not starting rsync daemon."))})
                            (C {(exit)} {(1)})
                          ]
                        )
                      spids: [144 145 168 -1]
                    )
                  ]
                  spids: [115 122 171]
                )
                (Case
                  to_match: {(DQ (x) ($ VSub_Name "$RSYNC_NICE"))}
                  arms: [
                    (case_arm
                      pat_list: [{(x) (Lit_Other "[") (0-9) (Lit_Other "]")}]
                      action: 
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LeftVar name:RSYNC_NICE_PARM)
                              rhs: {(DQ ("--nicelevel ") ($ VSub_Name "$RSYNC_NICE"))}
                              spids: [190]
                            )
                          ]
                          spids: [190]
                        )
                      spids: [184 188 195 -1]
                    )
                    (case_arm
                      pat_list: [{(x1) (Lit_Other "[") (0-9) (Lit_Other "]")}]
                      action: 
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LeftVar name:RSYNC_NICE_PARM)
                              rhs: {(DQ ("--nicelevel ") ($ VSub_Name "$RSYNC_NICE"))}
                              spids: [204]
                            )
                          ]
                          spids: [204]
                        )
                      spids: [198 202 209 -1]
                    )
                    (case_arm pat_list:[{(x)}] action:(NoOp) spids:[212213215-1])
                    (case_arm
                      pat_list: [{(Lit_Other "*")}]
                      action: 
                        (CommandList
                          children: [
                            (C {(log_warning_msg)} 
                              {
                                (DQ ("Value of RSYNC_NICE in ") ($ VSub_Name "$RSYNC_DEFAULTS_FILE") 
                                  (" must be a value between 0 and 19 (inclusive);")
                                )
                              }
                            )
                            (C {(log_warning_msg)} {(DQ ("ignoring RSYNC_NICE now."))})
                          ]
                        )
                      spids: [218 219 237 -1]
                    )
                  ]
                  spids: [174 181 240]
                )
                (Case
                  to_match: {(DQ (x) ($ VSub_Name "$RSYNC_IONICE"))}
                  arms: [
                    (case_arm
                      pat_list: [{(x-c) (Lit_Other "[") (123) (Lit_Other "]") (Lit_Other "*")}]
                      action: 
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LeftVar name:RSYNC_IONICE_PARM)
                              rhs: {(DQ ($ VSub_Name "$RSYNC_IONICE"))}
                              spids: [260]
                            )
                          ]
                          spids: [260]
                        )
                      spids: [253 258 264 -1]
                    )
                    (case_arm pat_list:[{(x)}] action:(NoOp) spids:[267268270-1])
                    (case_arm
                      pat_list: [{(Lit_Other "*")}]
                      action: 
                        (CommandList
                          children: [
                            (C {(log_warning_msg)} 
                              {
                                (DQ ("Value of RSYNC_IONICE in ") ($ VSub_Name "$RSYNC_DEFAULTS_FILE") 
                                  (" must be -c1, -c2 or -c3;")
                                )
                              }
                            )
                            (C {(log_warning_msg)} {(DQ ("ignoring RSYNC_IONICE now."))})
                          ]
                        )
                      spids: [273 274 292 -1]
                    )
                  ]
                  spids: [243 250 295]
                )
              ]
            )
          spids: [-1 107]
        )
      ]
      spids: [-1 297]
    )
    (Assignment
      keyword: Assign_Export
      pairs: [
        (assign_pair
          lhs: (LeftVar name:PATH)
          rhs: 
            {
              (DQ 
                (BracedVarSub
                  token: <VSub_Name PATH>
                  suffix_op: (StringUnary op_id:VTest_ColonPlus arg_word:{($ VSub_Name "$PATH") (":")})
                  spids: [304 309]
                ) ("/usr/sbin:/sbin")
              )
            }
          spids: [302]
        )
      ]
      spids: [300]
    )
    (FuncDef
      name: rsync_start
      body: 
        (BraceGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: 
                    (Sentence
                      command: 
                        (C {(Lit_Other "[")} {(KW_Bang "!")} {(-s)} 
                          {(DQ ($ VSub_Name "$RSYNC_CONFIG_FILE"))} {(Lit_Other "]")}
                        )
                      terminator: <Op_Semi ";">
                    )
                  action: 
                    (CommandList
                      children: [
                        (C {(log_failure_msg)} 
                          {(DQ ("missing or empty config file ") ($ VSub_Name "$RSYNC_CONFIG_FILE"))}
                        )
                        (C {(log_end_msg)} {(1)})
                        (C {(exit)} {(0)})
                      ]
                    )
                  spids: [-1 336]
                )
              ]
              spids: [-1 357]
            )
            (If
              arms: [
                (if_arm
                  cond: 
                    (Sentence
                      command: 
                        (AndOr
                          children: [
                            (C {(Lit_Other "[")} {(-n)} {(DQ ($ VSub_Name "$RSYNC_IONICE_PARM"))} 
                              {(Lit_Other "]")}
                            )
                            (AndOr
                              children: [
                                (C {(Lit_Other "[")} {(-x)} {(/usr/bin/ionice)} {(Lit_Other "]")})
                                (SimpleCommand
                                  words: [
                                    {(/usr/bin/ionice)}
                                    {(DQ ($ VSub_Name "$RSYNC_IONICE_PARM"))}
                                    {(true)}
                                  ]
                                  redirects: [
                                    (Redirect
                                      op_id: Redir_Great
                                      arg_word: {(/dev/null)}
                                      fd: 2
                                      spids: [397]
                                    )
                                  ]
                                )
                              ]
                              op_id: Op_DAmp
                            )
                          ]
                          op_id: Op_DAmp
                        )
                      terminator: <Op_Semi ";">
                    )
                  action: 
                    (SimpleCommand
                      words: [
                        {(/usr/bin/ionice)}
                        {(DQ ($ VSub_Name "$RSYNC_IONICE_PARM"))}
                        {(-p) ($ VSub_Dollar "$$")}
                      ]
                      redirects: [
                        (Redirect
                          op_id: Redir_Great
                          arg_word: {(/dev/null)}
                          fd: -1
                          spids: [413]
                        )
                        (Redirect
                          op_id: Redir_GreatAnd
                          arg_word: {(1)}
                          fd: 2
                          spids: [417]
                        )
                      ]
                    )
                  spids: [-1 401]
                )
              ]
              spids: [-1 421]
            )
            (If
              arms: [
                (if_arm
                  cond: 
                    (C {(start-stop-daemon)} {(--start)} {(--quiet)} {(--background)} {(--pidfile)} 
                      {($ VSub_Name "$RSYNC_PID_FILE")} {(--make-pidfile)} {($ VSub_Name "$RSYNC_NICE_PARM")} {(--exec)} {($ VSub_Name "$DAEMON")} {(--)} 
                      {(--no-detach)} {(--daemon)} {(--config)} {(DQ ($ VSub_Name "$RSYNC_CONFIG_FILE"))} {($ VSub_Name "$RSYNC_OPTS")}
                    )
                  action: 
                    (CommandList
                      children: [
                        (Assignment
                          keyword: Assign_None
                          pairs: [(assign_pair lhs:(LeftVar name:rc) rhs:{(0)} spids:[470])]
                          spids: [470]
                        )
                        (C {(sleep)} {(1)})
                        (If
                          arms: [
                            (if_arm
                              cond: 
                                (Sentence
                                  command: 
                                    (Pipeline
                                      children: [
                                        (SimpleCommand
                                          words: [
                                            {(kill)}
                                            {(-0)}
                                            {
                                              (CommandSubPart
                                                command_list: 
                                                  (C {(cat)} {($ VSub_Name "$RSYNC_PID_FILE")})
                                                spids: [487 491]
                                              )
                                            }
                                          ]
                                          redirects: [
                                            (Redirect
                                              op_id: Redir_Great
                                              arg_word: {(/dev/null)}
                                              fd: -1
                                              spids: [493]
                                            )
                                            (Redirect
                                              op_id: Redir_GreatAnd
                                              arg_word: {(1)}
                                              fd: 2
                                              spids: [496]
                                            )
                                          ]
                                        )
                                      ]
                                      negated: True
                                    )
                                  terminator: <Op_Semi ";">
                                )
                              action: 
                                (CommandList
                                  children: [
                                    (C {(log_failure_msg)} {(DQ ("rsync daemon failed to start"))})
                                    (Assignment
                                      keyword: Assign_None
                                      pairs: [
                                        (assign_pair
                                          lhs: (LeftVar name:rc)
                                          rhs: {(1)}
                                          spids: [510]
                                        )
                                      ]
                                      spids: [510]
                                    )
                                  ]
                                )
                              spids: [-1 500]
                            )
                          ]
                          spids: [-1 514]
                        )
                      ]
                    )
                  spids: [-1 467]
                )
              ]
              else_action: 
                (Assignment
                  keyword: Assign_None
                  pairs: [(assign_pair lhs:(LeftVar name:rc) rhs:{(1)} spids:[520])]
                  spids: [520]
                )
              spids: [517 524]
            )
            (If
              arms: [
                (if_arm
                  cond: 
                    (Sentence
                      command: 
                        (C {(Lit_Other "[")} {($ VSub_Name "$rc")} {(-eq)} {(0)} {(Lit_Other "]")})
                      terminator: <Op_Semi ";">
                    )
                  action: (C {(log_end_msg)} {(0)})
                  spids: [-1 540]
                )
              ]
              else_action: 
                (CommandList
                  children: [
                    (C {(log_end_msg)} {(1)})
                    (C {(rm)} {(-f)} {($ VSub_Name "$RSYNC_PID_FILE")})
                  ]
                )
              spids: [548 563]
            )
          ]
          spids: [318]
        )
      spids: [314 317]
    )
    (Case
      to_match: {(DQ ($ VSub_Number "$1"))}
      arms: [
        (case_arm
          pat_list: [{(start)}]
          action: 
            (If
              arms: [
                (if_arm
                  cond: 
                    (Sentence
                      command: (C {(DQ ($ VSub_Name "$RSYNC_ENABLE"))})
                      terminator: <Op_Semi ";">
                    )
                  action: 
                    (CommandList
                      children: [
                        (C {(log_daemon_msg)} {(DQ ("Starting rsync daemon"))} {(DQ (rsync))})
                        (If
                          arms: [
                            (if_arm
                              cond: 
                                (Sentence
                                  command: 
                                    (AndOr
                                      children: [
                                        (C {(Lit_Other "[")} {(-s)} {($ VSub_Name "$RSYNC_PID_FILE")} 
                                          {(Lit_Other "]")}
                                        )
                                        (SimpleCommand
                                          words: [
                                            {(kill)}
                                            {(-0)}
                                            {
                                              (CommandSubPart
                                                command_list: 
                                                  (C {(cat)} {($ VSub_Name "$RSYNC_PID_FILE")})
                                                spids: [622 626]
                                              )
                                            }
                                          ]
                                          redirects: [
                                            (Redirect
                                              op_id: Redir_Great
                                              arg_word: {(/dev/null)}
                                              fd: -1
                                              spids: [628]
                                            )
                                            (Redirect
                                              op_id: Redir_GreatAnd
                                              arg_word: {(1)}
                                              fd: 2
                                              spids: [631]
                                            )
                                          ]
                                        )
                                      ]
                                      op_id: Op_DAmp
                                    )
                                  terminator: <Op_Semi ";">
                                )
                              action: 
                                (CommandList
                                  children: [
                                    (C {(log_progress_msg)} {(DQ ("apparently already running"))})
                                    (C {(log_end_msg)} {(0)})
                                    (C {(exit)} {(0)})
                                  ]
                                )
                              spids: [-1 635]
                            )
                          ]
                          spids: [-1 655]
                        )
                        (C {(rsync_start)})
                      ]
                    )
                  spids: [-1 592]
                )
              ]
              else_action: 
                (If
                  arms: [
                    (if_arm
                      cond: 
                        (Sentence
                          command: 
                            (C {(Lit_Other "[")} {(-s)} {(DQ ($ VSub_Name "$RSYNC_CONFIG_FILE"))} 
                              {(Lit_Other "]")}
                            )
                          terminator: <Op_Semi ";">
                        )
                      action: 
                        (AndOr
                          children: [
                            (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$VERBOSE"))} 
                              {(KW_Bang "!") (Lit_Other "=")} {(no)} {(Lit_Other "]")}
                            )
                            (C {(log_warning_msg)} 
                              {
                                (DQ ("rsync daemon not enabled in ") 
                                  ($ VSub_Name "$RSYNC_DEFAULTS_FILE") (", not starting...")
                                )
                              }
                            )
                          ]
                          op_id: Op_DAmp
                        )
                      spids: [-1 677]
                    )
                  ]
                  spids: [-1 704]
                )
              spids: [661 707]
            )
          spids: [581 582 710 -1]
        )
        (case_arm
          pat_list: [{(stop)}]
          action: 
            (CommandList
              children: [
                (C {(log_daemon_msg)} {(DQ ("Stopping rsync daemon"))} {(DQ (rsync))})
                (C {(start-stop-daemon)} {(--stop)} {(--quiet)} {(--oknodo)} {(--pidfile)} 
                  {($ VSub_Name "$RSYNC_PID_FILE")}
                )
                (C {(log_end_msg)} {($ VSub_QMark "$?")})
                (C {(rm)} {(-f)} {($ VSub_Name "$RSYNC_PID_FILE")})
              ]
            )
          spids: [713 714 753 -1]
        )
        (case_arm
          pat_list: [{(reload)} {(force-reload)}]
          action: 
            (CommandList
              children: [
                (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: [757 760 777 -1]
        )
        (case_arm
          pat_list: [{(restart)}]
          action: 
            (CommandList
              children: [
                (C {(set)} {(Lit_Other "+") (e)})
                (If
                  arms: [
                    (if_arm
                      cond: 
                        (Sentence
                          command: (C {($ VSub_Name "$RSYNC_ENABLE")})
                          terminator: <Op_Semi ";">
                        )
                      action: 
                        (CommandList
                          children: [
                            (C {(log_daemon_msg)} {(DQ ("Restarting rsync daemon"))} {(DQ (rsync))})
                            (If
                              arms: [
                                (if_arm
                                  cond: 
                                    (Sentence
                                      command: 
                                        (AndOr
                                          children: [
                                            (C {(Lit_Other "[")} {(-s)} 
                                              {($ VSub_Name "$RSYNC_PID_FILE")} {(Lit_Other "]")}
                                            )
                                            (SimpleCommand
                                              words: [
                                                {(kill)}
                                                {(-0)}
                                                {
                                                  (CommandSubPart
                                                    command_list: 
                                                      (C {(cat)} {($ VSub_Name "$RSYNC_PID_FILE")})
                                                    spids: [826 830]
                                                  )
                                                }
                                              ]
                                              redirects: [
                                                (Redirect
                                                  op_id: Redir_Great
                                                  arg_word: {(/dev/null)}
                                                  fd: -1
                                                  spids: [832]
                                                )
                                                (Redirect
                                                  op_id: Redir_GreatAnd
                                                  arg_word: {(1)}
                                                  fd: 2
                                                  spids: [835]
                                                )
                                              ]
                                            )
                                          ]
                                          op_id: Op_DAmp
                                        )
                                      terminator: <Op_Semi ";">
                                    )
                                  action: 
                                    (CommandList
                                      children: [
                                        (AndOr
                                          children: [
                                            (C {(start-stop-daemon)} {(--stop)} {(--quiet)} {(--oknodo)} 
                                              {(--pidfile)} {($ VSub_Name "$RSYNC_PID_FILE")}
                                            )
                                            (C {(true)})
                                          ]
                                          op_id: Op_DPipe
                                        )
                                        (C {(sleep)} {(1)})
                                      ]
                                    )
                                  spids: [-1 839]
                                )
                              ]
                              else_action: 
                                (CommandList
                                  children: [
                                    (C {(log_warning_msg)} 
                                      {(DQ ("rsync daemon not running, attempting to start."))}
                                    )
                                    (C {(rm)} {(-f)} {($ VSub_Name "$RSYNC_PID_FILE")})
                                  ]
                                )
                              spids: [864 881]
                            )
                            (C {(rsync_start)})
                          ]
                        )
                      spids: [-1 796]
                    )
                  ]
                  else_action: 
                    (If
                      arms: [
                        (if_arm
                          cond: 
                            (Sentence
                              command: 
                                (C {(Lit_Other "[")} {(-s)} {(DQ ($ VSub_Name "$RSYNC_CONFIG_FILE"))} 
                                  {(Lit_Other "]")}
                                )
                              terminator: <Op_Semi ";">
                            )
                          action: 
                            (AndOr
                              children: [
                                (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$VERBOSE"))} 
                                  {(KW_Bang "!") (Lit_Other "=")} {(no)} {(Lit_Other "]")}
                                )
                                (C {(log_warning_msg)} 
                                  {
                                    (DQ ("rsync daemon not enabled in ") 
                                      ($ VSub_Name "$RSYNC_DEFAULTS_FILE") (", not starting...")
                                    )
                                  }
                                )
                              ]
                              op_id: Op_DAmp
                            )
                          spids: [-1 903]
                        )
                      ]
                      spids: [-1 930]
                    )
                  spids: [887 933]
                )
              ]
            )
          spids: [781 782 936 -1]
        )
        (case_arm
          pat_list: [{(status)}]
          action: 
            (CommandList
              children: [
                (C {(status_of_proc)} {(-p)} {($ VSub_Name "$RSYNC_PID_FILE")} 
                  {(DQ ($ VSub_Name "$DAEMON"))} {(rsync)}
                )
                (C {(exit)} {($ VSub_QMark "$?")})
              ]
            )
          spids: [940 941 965 -1]
        )
        (case_arm
          pat_list: [{(Lit_Other "*")}]
          action: 
            (CommandList
              children: [
                (C {(echo)} 
                  {(DQ ("Usage: /etc/init.d/rsync {start|stop|reload|force-reload|restart|status}"))}
                )
                (C {(exit)} {(1)})
              ]
            )
          spids: [968 969 -1 983]
        )
      ]
      spids: [572 578 983]
    )
    (C {(exit)} {(0)})
  ]
)