nixos/zoneminder: update on startup if needed
This commit is contained in:
parent
630de551ef
commit
cb5da4eacb
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user