<s> import os <EOL> from kokki import Script , Directory , File , Service , Package , Link , Template <EOL> version = "<STR_LIT>" <EOL> dirname = "<STR_LIT>" % version <EOL> filename = "<STR_LIT>" % dirname <EOL> url = "<STR_LIT>" % filename <EOL> Script ( "<STR_LIT>" , <EOL> not_if = lambda : os . path . exists ( "<STR_LIT>" ) , <EOL> cwd = "<STR_LIT>" , <EOL> code = ( <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" ) % dict ( url = url , dirname = dirname , filename = filename ) ) <EOL> Directory ( env . config . redis . dbdir , <EOL> owner = "<STR_LIT:root>" , <EOL> group = "<STR_LIT:root>" , <EOL> mode = <NUM_LIT:0> <NUM_LIT> , <EOL> recursive = True ) <EOL> File ( "<STR_LIT>" , <EOL> path = env . config . redis . configfile , <EOL> owner = "<STR_LIT:root>" , <EOL> group = "<STR_LIT:root>" , <EOL> mode = <NUM_LIT:0> <NUM_LIT> , <EOL> content = Template ( "<STR_LIT>" ) ) <EOL> File ( "<STR_LIT>" , <EOL> owner = "<STR_LIT:root>" , <EOL> group = "<STR_LIT:root>" , <EOL> mode = <NUM_LIT:0> <NUM_LIT> , <EOL> content = Template ( "<STR_LIT>" , <EOL> variables = dict ( <EOL> redis = dict ( <EOL> logpath = os . path . dirname ( env . config . redis . logfile ) , <EOL> dbdir = env . config . redis . dbdir , <EOL> configfile = env . config . redis . configfile , <EOL> pidfile = env . config . redis . pidfile , <EOL> options = [ ] , <EOL> ) ) ) ) <EOL> Service ( "<STR_LIT>" , <EOL> subscribes = [ <EOL> ( "<STR_LIT>" , env . resources [ "<STR_LIT>" ] [ "<STR_LIT>" ] ) , <EOL> ] ) <EOL> if "<STR_LIT>" in env . included_recipes : <EOL> Package ( "<STR_LIT>" , <EOL> provider = "<STR_LIT>" ) <EOL> for n in ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) : <EOL> Link ( "<STR_LIT>" % n , <EOL> to = "<STR_LIT>" % n , <EOL> notifies = [ ( "<STR_LIT>" , env . resources [ '<STR_LIT>' ] [ '<STR_LIT>' ] ) ] ) </s>
