Skip to content

Commit

Permalink
nixos/librenms: enable optimizations and view-cache
Browse files Browse the repository at this point in the history
Enables optimizations and view cache for the librenms module.
Optimizations and view cache are both regenerated with each package
update.

(cherry picked from commit 6abc69d)
  • Loading branch information
NetaliDev authored and github-actions[bot] committed Dec 27, 2024
1 parent 0f711df commit 884cf43
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 884cf43

Please sign in to comment.