1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 15:11:35 +00:00

unifi: Clean all of webapps at start and stop

This commit is contained in:
William A. Kennington III 2014-11-24 00:22:12 -08:00
parent 6872a4a797
commit 8f0d65e2df

View file

@ -63,14 +63,14 @@ in
chmod 0700 "${stateDir}"
# Create the volatile webapps
rm -rf "${stateDir}/webapps"
mkdir -p "${stateDir}/webapps"
chown unifi "${stateDir}/webapps"
rm -f "${stateDir}/webapps/ROOT.war"
ln -s "${pkgs.unifi}/webapps/ROOT.war" "${stateDir}/webapps/ROOT.war"
'';
postStop = ''
rm "${stateDir}/webapps/ROOT.war"
rm "${stateDir}/webapps"
'';
serviceConfig = {