charybdis service: fix preStart script

This commit is contained in:
tv 2015-07-13 15:11:18 +02:00
parent 45e07f5503
commit baab714b2e

View file

@ -85,10 +85,8 @@ in
PermissionsStartOnly = true; # preStart needs to run with root permissions
};
preStart = ''
if ! test -d /var/lib/charybdis; then
${coreutils}/bin/mkdir -p ${cfg.statedir}
${coreutils}/bin/chown ${cfg.user}:${cfg.group} ${cfg.statedir}
fi
${coreutils}/bin/mkdir -p ${cfg.statedir}
${coreutils}/bin/chown ${cfg.user}:${cfg.group} ${cfg.statedir}
'';
};