(command.CommandList children: [ (C {<set>} {<-e>}) (command.Case to_match: {($ Id.VSub_Number 1)} arms: [ (case_arm pat_list: [{<start>}] action: [ (C {<'/etc/init.d/nmbd'>} {<start>}) (C {<'/etc/init.d/smbd'>} {<start>}) (C {<'/etc/init.d/samba-ad-dc'>} {<start>}) ] spids: [47 48 66 -1] ) (case_arm pat_list: [{<stop>}] action: [ (C {<'/etc/init.d/samba-ad-dc'>} {<stop>}) (C {<'/etc/init.d/smbd'>} {<stop>}) (C {<'/etc/init.d/nmbd'>} {<stop>}) ] spids: [69 70 88 -1] ) (case_arm pat_list: [{<reload>}] action: [(C {<'/etc/init.d/smbd'>} {<reload>})] spids: [91 92 100 -1] ) (case_arm pat_list: [{<restart>} {<force-reload>}] action: [ (C {<'/etc/init.d/nmbd'>} {(DQ ($ Id.VSub_Number 1))}) (C {<'/etc/init.d/smbd'>} {(DQ ($ Id.VSub_Number 1))}) (C {<'/etc/init.d/samba-ad-dc'>} {(DQ ($ Id.VSub_Number 1))}) ] spids: [103 106 130 -1] ) (case_arm pat_list: [{<status>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'status='> name:status) op: assign_op.Equal rhs: {<0>} spids: [137] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'NMBD_DISABLED='> name:NMBD_DISABLED) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [ {<testparm>} {<-s>} {<--parameter-name> <Id.Lit_Equals '='> (SQ <'disable netbios'>)} ] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] more_env: [] do_fork: T ) (C {<true>}) ] ) right: <Id.Backtick_Right '`'> ) } spids: [141] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SERVER_ROLE='> name:SERVER_ROLE) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Pipeline children: [ (command.Simple words: [ {<samba-tool>} {<testparm>} {<--parameter-name> <Id.Lit_Equals '='> (DQ <'server role'>)} ] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] more_env: [] do_fork: T ) (C {<tail>} {<-1>}) ] negated: F stderr_indices: [] ) (C {<true>}) ] ) right: <Id.Backtick_Right '`'> ) } spids: [164] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName SERVER_ROLE))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <'active directory domain controller'>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName NMBD_DISABLED))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <Yes>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<'/etc/init.d/nmbd'>} {<status>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'status='> name: status ) op: assign_op.Equal rhs: {($ Id.VSub_QMark '?')} spids: [241] ) ] redirects: [] ) ] ) ] spids: [214 232] ) ] else_action: [] redirects: [] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<'/etc/init.d/smbd'>} {<status>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'status='> name:status) op: assign_op.Equal rhs: {($ Id.VSub_QMark '?')} spids: [254] ) ] redirects: [] ) ] ) ] spids: [193 211] ) ] else_action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<'/etc/init.d/samba-ad-dc'>} {<status>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'status='> name:status) op: assign_op.Equal rhs: {($ Id.VSub_QMark '?')} spids: [267] ) ] redirects: [] ) ] ) ] redirects: [] ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_DollarName status)} ) ] spids: [133 134 279 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (C {<echo>} {(DQ <'Usage: /etc/init.d/samba {start|stop|reload|restart|force-reload|status}'>)} ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [282 283 298 -1] ) ] redirects: [] ) ] )