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}" chmod 0700 "${stateDir}"
# Create the volatile webapps # Create the volatile webapps
rm -rf "${stateDir}/webapps"
mkdir -p "${stateDir}/webapps" mkdir -p "${stateDir}/webapps"
chown unifi "${stateDir}/webapps" chown unifi "${stateDir}/webapps"
rm -f "${stateDir}/webapps/ROOT.war"
ln -s "${pkgs.unifi}/webapps/ROOT.war" "${stateDir}/webapps/ROOT.war" ln -s "${pkgs.unifi}/webapps/ROOT.war" "${stateDir}/webapps/ROOT.war"
''; '';
postStop = '' postStop = ''
rm "${stateDir}/webapps/ROOT.war" rm "${stateDir}/webapps"
''; '';
serviceConfig = { serviceConfig = {