(command.CommandList
  children: [
    (C {<set>} {<-e>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: 
            (sh_lhs_expr.Name
              left: <Id.Lit_VarLike 'HEED_DEFAULT_DISPLAY_MANAGER='>
              name: HEED_DEFAULT_DISPLAY_MANAGER
            )
          op: assign_op.Equal
          rhs: (rhs_word.Empty)
          spids: [95]
        )
      ]
      redirects: []
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName HEED_DEFAULT_DISPLAY_MANAGER))} 
          {<Id.Lit_RBracket ']'>}
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: 
                (sh_lhs_expr.Name
                  left: <Id.Lit_VarLike 'HEED_DEFAULT_DISPLAY_MANAGER='>
                  name: HEED_DEFAULT_DISPLAY_MANAGER
                )
              op: assign_op.Equal
              rhs: {<true>}
              spids: [121]
            )
          ]
          redirects: []
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: 
            (sh_lhs_expr.Name
              left: <Id.Lit_VarLike 'DEFAULT_DISPLAY_MANAGER_FILE='>
              name: DEFAULT_DISPLAY_MANAGER_FILE
            )
          op: assign_op.Equal
          rhs: {<'/etc/X11/default-display-manager'>}
          spids: [125]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PATH='> name:PATH)
          op: assign_op.Equal
          rhs: 
            {<'/bin'> <Id.Lit_Colon ':'> <'/usr/bin'> <Id.Lit_Colon ':'> <'/sbin'> <Id.Lit_Colon ':'> 
              <'/usr/sbin'>
            }
          spids: [129]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DAEMON='> name:DAEMON)
          op: assign_op.Equal
          rhs: {<'/usr/sbin/lightdm'>}
          spids: [138]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PIDFILE='> name:PIDFILE)
          op: assign_op.Equal
          rhs: {<'/var/run/lightdm.pid'>}
          spids: [141]
        )
      ]
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<-r>} {<'/etc/default/locale'>} {<Id.Lit_RBracket ']'>})
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [(C {<.>} {<'/etc/default/locale'>}) (C {<export>} {<LANG>} {<LANGUAGE>})]
          spids: [145 156]
        )
      ]
      else_action: []
      redirects: []
    )
    (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.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SSD_START_ARGS='> name:SSD_START_ARGS)
          op: assign_op.Equal
          rhs: 
            {
              (DQ <'--pidfile '> ($ Id.VSub_DollarName PIDFILE) <' --name '> 
                (command_sub
                  left_token: <Id.Left_DollarParen '$('>
                  child: (C {<basename>} {($ Id.VSub_DollarName DAEMON)})
                  right: <Id.Eof_RParen _>
                ) <' --startas '> ($ Id.VSub_DollarName DAEMON) <' -- -d'>
              )
            }
          spids: [191]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SSD_STOP_ARGS='> name:SSD_STOP_ARGS)
          op: assign_op.Equal
          rhs: 
            {
              (DQ <'--pidfile '> ($ Id.VSub_DollarName PIDFILE) <' --name '> 
                (command_sub
                  left_token: <Id.Left_DollarParen '$('>
                  child: (C {<basename>} {($ Id.VSub_DollarName DAEMON)})
                  right: <Id.Eof_RParen _>
                ) <' --retry TERM/5/TERM/5'>
              )
            }
          spids: [206]
        )
      ]
      redirects: []
    )
    (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: 
                            (command.AndOr
                              ops: [Id.Op_DAmp Id.Op_DAmp]
                              children: [
                                (C {<Id.Lit_LBracket '['>} 
                                  {(DQ ($ Id.VSub_DollarName HEED_DEFAULT_DISPLAY_MANAGER))} {<Id.Lit_Equals '='>} {(DQ <true>)} {<Id.Lit_RBracket ']'>}
                                )
                                (C {<Id.Lit_LBracket '['>} {<-e>} 
                                  {($ Id.VSub_DollarName DEFAULT_DISPLAY_MANAGER_FILE)} {<Id.Lit_RBracket ']'>}
                                )
                                (C {<Id.Lit_LBracket '['>} 
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: 
                                          (C {<cat>} 
                                            {($ Id.VSub_DollarName DEFAULT_DISPLAY_MANAGER_FILE)}
                                          )
                                        right: <Id.Eof_RParen _>
                                      )
                                    )
                                  } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <'/usr/bin/lightdm'>)} {<-a>} 
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: 
                                          (C {<cat>} 
                                            {($ Id.VSub_DollarName DEFAULT_DISPLAY_MANAGER_FILE)}
                                          )
                                        right: <Id.Eof_RParen _>
                                      )
                                    )
                                  } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <'/usr/sbin/lightdm'>)} {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} 
                      {(DQ <'Not starting X display manager (lightdm); it is not the default'>)} {(DQ <'display manager.'>)}
                    )
                  ]
                  spids: [233 300]
                )
              ]
              else_action: [
                (C {<log_daemon_msg>} {(DQ <'Starting X display manager'>)} {(DQ <lightdm>)})
                (command.AndOr
                  ops: [Id.Op_DPipe]
                  children: [
                    (C {<start-stop-daemon>} {<--start>} {<--quiet>} 
                      {($ Id.VSub_DollarName SSD_START_ARGS)}
                    )
                    (C {<log_progress_msg>} {(DQ <'already running'>)})
                  ]
                )
                (C {<log_end_msg>} {<0>})
              ]
              redirects: []
            )
          ]
          spids: [229 230 357 -1]
        )
        (case_arm
          pat_list: [{<restart>}]
          action: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {<-f>} {($ Id.VSub_DollarName PIDFILE)} 
                  {<Id.Lit_RBracket ']'>}
                )
                (C {<'/etc/init.d/lightdm'>} {<stop>})
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {<-f>} {($ Id.VSub_DollarName PIDFILE)} 
                  {<Id.Lit_RBracket ']'>}
                )
                (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              ]
            )
            (C {<'/etc/init.d/lightdm'>} {<start>})
          ]
          spids: [361 362 400 -1]
        )
        (case_arm
          pat_list: [{<stop>}]
          action: [
            (C {<log_daemon_msg>} {(DQ <'Stopping X display manager'>)} {(DQ <lightdm>)})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Pipeline
                              children: [
                                (C {<Id.Lit_LBracket '['>} {<-f>} {($ Id.VSub_DollarName PIDFILE)} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              ]
                              negated: T
                              stderr_indices: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<log_progress_msg>} 
                      {(DQ <'not running ('> ($ Id.VSub_DollarName PIDFILE) <' not found)'>)}
                    )
                  ]
                  spids: [419 432]
                )
              ]
              else_action: [
                (C {<start-stop-daemon>} {<--stop>} {<--quiet>} {($ Id.VSub_DollarName SSD_STOP_ARGS)})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SSD_RES='> name:SSD_RES)
                      op: assign_op.Equal
                      rhs: {($ Id.VSub_QMark '?')}
                      spids: [456]
                    )
                  ]
                  redirects: []
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName SSD_RES)} {<-eq>} {<1>} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [(C {<log_progress_msg>} {(DQ <'not running'>)})]
                      spids: [460 473]
                    )
                  ]
                  else_action: []
                  redirects: []
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName SSD_RES)} {<-eq>} {<2>} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [(C {<log_progress_msg>} {(DQ <'not responding to TERM signals'>)})]
                      spids: [486 499]
                    )
                  ]
                  else_action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<-f>} {($ Id.VSub_DollarName PIDFILE)} 
                                      {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<log_progress_msg>} 
                              {(DQ <'(removing stale '> ($ Id.VSub_DollarName PIDFILE) <')'>)}
                            )
                            (C {<rm>} {($ Id.VSub_DollarName PIDFILE)})
                          ]
                          spids: [512 523]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                  ]
                  redirects: []
                )
              ]
              redirects: []
            )
            (C {<log_end_msg>} {<0>})
          ]
          spids: [404 405 554 -1]
        )
        (case_arm
          pat_list: [{<force-reload>}]
          action: [(C {<'/etc/init.d/lightdm'>} {<restart>})]
          spids: [557 558 566 -1]
        )
        (case_arm
          pat_list: [{<Id.Lit_Star '*'>}]
          action: [
            (C {<echo>} {(DQ <'Usage: /etc/init.d/lightdm {start|stop|restart|force-reload}'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [570 571 586 -1]
        )
      ]
      redirects: []
    )
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)