summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorDaniel Fullmer <danielrf12@gmail.com>2020-02-09 13:28:32 -0500
committerDaniel Fullmer <danielrf12@gmail.com>2020-03-07 12:59:39 -0500
commitcb5da4eacbffcc7fcb7178069bb14ac879c5999d (patch)
treed74a661e62446ed8473eb6f977181939181baf9f /nixos
parent630de551ef46ec03d94c6a9c82f67c3abb8fa743 (diff)
downloadnixpkgs-cb5da4eacbffcc7fcb7178069bb14ac879c5999d.tar
nixpkgs-cb5da4eacbffcc7fcb7178069bb14ac879c5999d.tar.gz
nixpkgs-cb5da4eacbffcc7fcb7178069bb14ac879c5999d.tar.bz2
nixpkgs-cb5da4eacbffcc7fcb7178069bb14ac879c5999d.tar.lz
nixpkgs-cb5da4eacbffcc7fcb7178069bb14ac879c5999d.tar.xz
nixpkgs-cb5da4eacbffcc7fcb7178069bb14ac879c5999d.tar.zst
nixpkgs-cb5da4eacbffcc7fcb7178069bb14ac879c5999d.zip
nixos/zoneminder: update on startup if needed
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/misc/zoneminder.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/nixos/modules/services/misc/zoneminder.nix b/nixos/modules/services/misc/zoneminder.nix
index d7f7324580c..d5b3537068d 100644
--- a/nixos/modules/services/misc/zoneminder.nix
+++ b/nixos/modules/services/misc/zoneminder.nix
@@ -77,6 +77,8 @@ in {
         `config.services.zoneminder.database.createLocally` to true. Otherwise,
         when set to `false` (the default), you will have to create the database
         and database user as well as populate the database yourself.
+        Additionally, you will need to run `zmupdate.pl` yourself when
+        upgrading to a newer version.
       '';
 
       webserver = mkOption {
@@ -330,6 +332,8 @@ in {
             ${config.services.mysql.package}/bin/mysql < ${pkg}/share/zoneminder/db/zm_create.sql
             touch "/var/lib/${dirName}/db-created"
           fi
+
+          ${zoneminder}/bin/zmupdate.pl -nointeractive
         '';
         serviceConfig = {
           User = user;