(BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'LANG='> name:LANG) op: assign_op.Equal rhs: {<en_GB.UTF-8>} spids: [83] ) ] redirects: [] ) (C {<cd>} {(DQ ($ Id.VSub_DollarName HOME))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'INPUT='> name:INPUT) op: assign_op.Equal rhs: {<0>} spids: [100] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_EqualTilde left: {($ Id.VSub_Number 1)} right: {<Id.Lit_Other '^'> <-> <Id.Lit_Other '?'> <Id.Lit_Other '['> <0-9> <Id.Lit_Other ']'> <Id.Lit_Other '+'> <Id.Lit_Other '$'> } ) redirects: [] ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'INPUT='> name:INPUT) op: assign_op.Equal rhs: {($ Id.VSub_Number 1)} spids: [128] ) ] redirects: [] ) ] spids: [105 125] ) ] else_action: [] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'FILEPATH_DIETPI_RAMLOG_SAVE='> name: FILEPATH_DIETPI_RAMLOG_SAVE ) op: assign_op.Equal rhs: {(SQ <'/var/lib/dietpi/dietpi-ramlog/storage'>)} spids: [149] ) ] redirects: [] ) (command.ShFunction name: Apply_Unique_Logfile_Permissions body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (C {<chown>} {<www-data> <Id.Lit_Colon ':'> <www-data>} {<'/var/log/pihole.log'>}) (C {<chown>} {<-R>} {<mongodb> <Id.Lit_Colon ':'> <mongodb>} {<'/var/log/mongodb'>}) (C {<chmod>} {<666>} {<'/var/log/emoncms.log'>}) (C {<chown>} {<-R>} {<debian-tor> <Id.Lit_Colon ':'> <nogroup>} {<'/var/log/tor/notices.log'>} ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: {($ Id.VSub_DollarName INPUT)} right: {<Id.Lit_Digits 0>} ) redirects: [] ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} {<-e>} {(DQ <'DietPi-Ramlog: Starting'>)}) (command.Simple words: [{<mkdir>} {<-p>} {<'/var/log/apt'>}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] more_env: [] do_fork: T ) (command.Simple words: [{<mkdir>} {<-p>} {<'/var/log/apache2'>}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] more_env: [] do_fork: T ) (command.Simple words: [{<mkdir>} {<-p>} {<'/var/log/fsck'>}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] more_env: [] do_fork: T ) (command.Simple words: [{<mkdir>} {<-p>} {<'/var/log/news'>}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] more_env: [] do_fork: T ) (command.Simple words: [{<mkdir>} {<-p>} {<'/var/log/samba'>}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] more_env: [] do_fork: T ) (command.Simple words: [{<mkdir>} {<-p>} {<'/var/log/ntpstats'>}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] more_env: [] do_fork: T ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-d>} {(DQ ($ Id.VSub_DollarName FILEPATH_DIETPI_RAMLOG_SAVE))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<cp>} {<-R>} {<-p>} {<--attributes-only>} {(DQ ($ Id.VSub_DollarName FILEPATH_DIETPI_RAMLOG_SAVE)) <'/'> <Id.Lit_Star '*'>} {<'/var/log/'>} ) ] spids: [360 373] ) ] else_action: [] redirects: [] ) (C {<chmod>} {<-R>} {<775>} {<'/var/log'>}) (command.Simple words: [{<Apply_Unique_Logfile_Permissions>}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] more_env: [] do_fork: T ) (C {<echo>} {<-e>} {(DQ <'DietPi-Ramlog: Completed'>)}) ] spids: [253 267] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: {($ Id.VSub_DollarName INPUT)} right: {<Id.Lit_Digits 1>} ) redirects: [] ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} {<-e>} {(DQ <'DietPi-Ramlog: Stopping'>)}) (C {<rm>} {<-R>} {(DQ ($ Id.VSub_DollarName FILEPATH_DIETPI_RAMLOG_SAVE))}) (C {<mkdir>} {<-p>} {(DQ ($ Id.VSub_DollarName FILEPATH_DIETPI_RAMLOG_SAVE))}) (C {<cp>} {<-R>} {<-p>} {<--attributes-only>} {<'/var/log/'> <Id.Lit_Star '*'>} {(DQ ($ Id.VSub_DollarName FILEPATH_DIETPI_RAMLOG_SAVE)) <'/'>} ) (C {<echo>} {<-e>} {(DQ <'DietPi-Ramlog: Completed'>)}) ] spids: [437 451] ) ] else_action: [] redirects: [] ) (command.ControlFlow token:<Id.ControlFlow_Exit exit>) ] redirects: [] right: <Id.Lit_RBrace '}'> )