Skip to content

Commit

Permalink
nixos/librenms: enable optimizations and view-cache (#367679)
Browse files Browse the repository at this point in the history
  • Loading branch information
xanderio authored Dec 23, 2024
2 parents 83dfdf2 + 6abc69d commit db087bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nixos/modules/services/monitoring/librenms.nix
Original file line number Diff line number Diff line change
Expand Up @@ -603,10 +603,14 @@ in
''
)
+ ''
# clear cache after update
# clear cache after update and regenerate optimizations
OLD_VERSION=$(cat ${cfg.dataDir}/version)
if [[ $OLD_VERSION != "${package.version}" ]]; then
rm -r ${cfg.dataDir}/cache/*
${artisanWrapper}/bin/librenms-artisan view:clear
${artisanWrapper}/bin/librenms-artisan optimize:clear
${artisanWrapper}/bin/librenms-artisan view:cache
${artisanWrapper}/bin/librenms-artisan optimize
echo "${package.version}" > ${cfg.dataDir}/version
fi
Expand Down

0 comments on commit db087bf

Please sign in to comment.