diff --git a/nixos/modules/services/monitoring/librenms.nix b/nixos/modules/services/monitoring/librenms.nix index 5275d61ecbdf6..6e7b5b3de4c87 100644 --- a/nixos/modules/services/monitoring/librenms.nix +++ b/nixos/modules/services/monitoring/librenms.nix @@ -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