From d125609cf9ec5e3232bb361ca642d57479d728bd Mon Sep 17 00:00:00 2001 From: stan Date: Fri, 10 Jan 2003 22:06:44 +0000 Subject: [PATCH] Changed a few defaults and reordered. git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@269 e3e1d417-86f3-4887-817a-d78f3d33393f --- zmconfig.pl.in | 444 ++++++++++++++++++++++++++----------------------- 1 file changed, 235 insertions(+), 209 deletions(-) diff --git a/zmconfig.pl.in b/zmconfig.pl.in index 3d446fd7b..d7f19b99b 100755 --- a/zmconfig.pl.in +++ b/zmconfig.pl.in @@ -32,9 +32,10 @@ if ( !GetOptions( 'file=s'=>\$config_file, 'interactive!'=>\$interactive, 'repro my %types = ( anything => { hint => 'free text', parse => sub { return( int($_[0] =~ /^(.+)$/ ), $1 ) } }, - abs_path => { hint => '/absolute/path/to/somewhere', parse => sub { return( int($_[0] =~ /^((?:\/[^\/]*)+)\/?$/ ), $1 ) } }, - rel_path => { hint => 'relative/path/to/somewhere', parse => sub { return( int($_[0] =~ /^([^\/].*)\/?$/ ), $1 ) } }, - filename => { hint => 'filename.type', parse => sub { return( int($_[0] =~ /^([a-zA-Z0-9-_.]+)$/ ), $1 ) } }, + abs_path => { hint => '/absolute/path/to/somewhere', parse => sub { return( int($_[0] =~ /^((?:\/[^\/]*)+?)\/?$/ ), $1 ) } }, + rel_path => { hint => 'relative/path/to/somewhere', parse => sub { return( int($_[0] =~ /^((?:[^\/].*)?)\/?$/ ), $1 ) } }, + directory => { hint => 'directory', parse => sub { return( int($_[0] =~ /^([a-zA-Z0-9-_.]+)$/ ), $1 ) } }, + file => { hint => 'filename', parse => sub { return( int($_[0] =~ /^([a-zA-Z0-9-_.]+)$/ ), $1 ) } }, hostname => { hint => 'host.your.domain', parse => sub { return( int($_[0] =~ /^([a-zA-Z0-9_.-]+)$/ ), $1 ) } }, string => { hint => 'string', parse => sub { return( int($_[0] =~ /^([a-zA-Z0-9-_]+)$/ ), $1 ) } }, boolean => { hint => 'yes/no', parse => sub { return( int($_[0] =~ /^([yn])/i ), ($1 && $1 =~ /^y/) ? 'yes' : 'no' ) } }, @@ -61,60 +62,105 @@ my @options = }, { name => "ZM_DB_USERA", - default => "zmadmin", + default => "", description => "Privileged DB user name, needs at least select, insert, update and delete privileges", help => "This is the username of a MySQL user that has full privileges to select, insert, update and delete data from your ZoneMinder database. If you have no user available yet you can create one by typing 'mysql mysql' with additional parameters as required to give you access. Then at the prompt type 'grant select,insert,update,delete on .* to '' identified by '';'. Then type 'quit' to exit. You may also need to type 'mysqladmin reload' to ensure your changes take effect. Note that the username and passwords used here are not related to your Linux login or accounts and should not be the same.", type => $types{string}, }, { name => "ZM_DB_PASSA", - default => "zmadminzm", + default => "", description => "Privileged DB user password", help => "This is the password of a MySQL user that has full privileges to select, insert, update and delete data from your ZoneMinder database. If you have no user available yet you can create one by typing 'mysql mysql' with additional parameters as required to give you access. Then at the prompt type 'grant select,insert,update,delete on .* to '' identified by '';'. Then type 'quit' to exit. You may also need to type 'mysqladmin reload' to ensure your changes take effect. Note that the username and passwords used here are not related to your Linux login or accounts and should not be the same.", type => $types{string}, }, { name => "ZM_DB_USERB", - default => "zmuser", + default => "", description => "Unprivileged DB user name, need just select privilege.", help => "This is the username of a MySQL user that has only privileges to select data from your ZoneMinder database and is used in cgi programs where full access is neither necessary or desiarable. If you have no user available yet you can create one by typing 'mysql mysql' with additional parameters as required to give you access. Then at the prompt type 'grant select on .* to '' identified by '';'. Then type 'quit' to exit. You may also need to type 'mysqladmin reload' to ensure your changes take effect. Note that the username and passwords used here are not related to your Linux login or accounts and should not be the same.", type => $types{string}, }, { name => "ZM_DB_PASSB", - default => "zmuserzm", + default => "", description => "Unprivileged DB user password", help => "This is the password of a MySQL user that has only privileges to select data from your ZoneMinder database and is used in cgi programs where full access is neither necessary or desiarable. If you have no user available yet you can create one by typing 'mysql mysql' with additional parameters as required to give you access. Then at the prompt type 'grant select on .* to '' identified by '';'. Then type 'quit' to exit. You may also need to type 'mysqladmin reload' to ensure your changes take effect. Note that the username and passwords used here are not related to your Linux login or accounts and should not be the same.", type => $types{string}, }, { - name => "ZM_EVENT_DIR", + name => "ZM_DIR_EVENTS", default => "events", - description => "Local path to where events directory lives", + description => "Directory where events are stored", help => "This is the path to the events directory where all the event images and other miscellaneous files are stored. It is normally given as a subdirectory of the web directory you have specified earlier however if disk space is tight it can reside on another partition in which case you should create a link from that area to the path you give here.", - type => $types{abs_path}, + type => $types{directory}, }, { - name => "ZM_WEB_CAMBOZOLA", - default => "cambozola.jar", - description => "Web path to (optional) cambozola java streaming client (recommended)", + name => "ZM_DIR_IMAGES", + default => "images", + description => "Directory where the images that the ZoneMinder client generates are stored", + help => "ZoneMinder generates a myriad of images, mosty of which are associated with events. For those that aren't this is where they go.", + type => $types{directory}, + }, + { + name => "ZM_DIR_SOUNDS", + default => "sounds", + description => "Directory to the sounds that the ZoneMinder client can use", + description => "Directory where images are stored", + help => "ZoneMinder generates a myriad of images, mosty of which are associated with events. For those that aren't this is where they go.", + type => $types{directory}, + }, + { + name => "ZM_OPT_CAMBOZOLA", + default => "no", + description => "Is the (optional) cambozola java streaming client installed (recommended)", help => "Cambozola is a handy low fat cheese flavoured Java applet that ZoneMinder uses to view image streams on browsers such as Internet Explorer that don't natively support this format. It is highly recommended to install this from http://www.charliemouse.com/code/cambozola/ however if it is not installed still images at a lower refresh rate can still be viewed.", + type => $types{boolean}, + }, + { + name => "ZM_PATH_CAMBOZOLA", + default => "", + description => "Web path to (optional) cambozola java streaming client (recommended)", + help => "Cambozola is a handy low fat cheese flavoured Java applet that ZoneMinder uses to view image streams on browsers such as Internet Explorer that don't natively support this format. It is highly recommended to install this from http://www.charliemouse.com/code/cambozola/ however if it is not installed still images at a lower refresh rate can still be viewed. Leave this blank if cambozola is installed in the same directory as the ZoneMinder web client files.", + requires => [ { name=>"ZM_OPT_CAMBOZOLA", value=>"yes" } ], type => $types{rel_path}, }, + { + name => "ZM_OPT_MPEG", + default => "no", + description => "Is the (optional) mpeg video encoder installed", + help => "ZoneMinder can optionally encode a series of video images into an MPEG encoded file and this path should point to where the Berkeley mpeg_encode program has ben installed. This encoder is fairly slow and you don't lose much by not having it as events can still be reviewed as video stream without it.", + type => $types{boolean}, + }, { name => "ZM_PATH_MPEG_ENCODE", - default => "/usr/local/bin/mpeg_encode", + default => "/usr/local/bin", description => "Path to (optional) mpeg video encoder", - help => "ZoneMinder can optionally encode a series of video images into an MPGE encoded file and this path should point to where the Berkeley mpeg_encode program has ben installed. This encoder is fairly slow and you don't lose much by not having it as events can still be reviewed as video stream without it.", + help => "ZoneMinder can optionally encode a series of video images into an MPEG encoded file and this path should point to where the Berkeley mpeg_encode program has ben installed. This encoder is fairly slow and you don't lose much by not having it as events can still be reviewed as video stream without it.", + requires => [ { name=>"ZM_OPT_MPEG", value=>"yes" } ], type => $types{abs_path}, }, + { + name => "ZM_OPT_NETPBM", + default => "no", + description => "Are the (optional) Netpbm utilities installed", + help => "For low bandwidth situations ZoneMinder will resize images into thumbnails on the fly before sending them to the browser to reduce the network traffic at the expense of CPU on the server. It uses the Netpbm package to do this and this option should be set to where the binaries from that package are installed. If you do not have it installed it means that the images will always be sent full sizxe and rescaled on your browser whioch may or not be an isue for you.", + type => $types{boolean}, + }, { name => "ZM_PATH_NETPBM", default => "/usr/bin", description => "Path to (optional) Netpbm utilities", help => "For low bandwidth situations ZoneMinder will resize images into thumbnails on the fly before sending them to the browser to reduce the network traffic at the expense of CPU on the server. It uses the Netpbm package to do this and this option should be set to where the binaries from that package are installed. If you do not have it installed it means that the images will always be sent full sizxe and rescaled on your browser whioch may or not be an isue for you.", + requires => [ { name=>"ZM_OPT_NETPBM", value=>"yes" } ], + type => $types{abs_path}, + }, + { + name => "ZM_PATH_LOGS", + default => "/tmp", + description => "Path to the various logs that the ZoneMinder daemons generate", + help => "There are various daemons that are used by ZoneMinder to perform various tasks. Most generate helpful log files and this is where they go. They can be deleted if not required for debugging.", type => $types{abs_path}, - guess => sub { }, }, { name => "ZM_WEB_POPUP_ON_ALARM", @@ -123,28 +169,6 @@ my @options = help => "When viewing a live monitor stream you can specify whether you want the window to pop to the front if an alarm occurs when the window is minimised or behind another window. This is most useful if your monitors are over doors for example when they can pop up if someone comes to the doorway.", type => $types{boolean}, }, - { - name => "ZM_WEB_SOUND_ON_ALARM", - default => "no", - description => "Should the monitor window play an alarm sound if an alarm occurs", - help => "When viewing a live monitor stream you can specify whether you want the window to play a sound to alert you if an alarm occurs.", - type => $types{boolean}, - }, - { - name => "ZM_WEB_ALARM_SOUND", - default => "", - description => "The sound to play on alarm, put this in the sounds directory", - help => "You can specify a sound file to play if an alarm occurs whilst you are watching a live monitor stream. So long as your browser understands the format it does not need to be any particular type. This file should be placed in the /var/www/html/zm/sounds directory.", - type => $types{filename}, - requires => [ { name => "ZM_WEB_SOUND_ON_ALARM", value => "yes" } ], - }, - { - name => "ZM_OPT_FAST_DELETE", - default => "yes", - description => "When deleting events should the client only delete the database records for speed", - help => "Normally an event created as the result of an alarm consists of entries in one or more database tables plus the various files associated with it. When deleting events in the browser it can take a long time to remove all of this if your are trying to do a lot of events at once. It is recommended that you set this option which means that the browser client only deletes the key entries in the events table, which means the events will no longer appear in listing, and leaves the zmaudit daemon to clear up the rest later.", - type => $types{boolean}, - }, { name => "ZM_OPT_X10", default => "yes", @@ -176,12 +200,173 @@ my @options = help => "The zmx10 daemon periodically checks the database to find out what X10 events trigger, or result from, alarms. This option determines how frequently this check occurs, unless you change this area frequently this can be a fairly large value.", type => $types{integer}, }, + { + name => "ZM_WEB_SOUND_ON_ALARM", + default => "no", + description => "Should the monitor window play an alarm sound if an alarm occurs", + help => "When viewing a live monitor stream you can specify whether you want the window to play a sound to alert you if an alarm occurs.", + type => $types{boolean}, + }, + { + name => "ZM_WEB_ALARM_SOUND", + default => "", + description => "The sound to play on alarm, put this in the sounds directory", + help => "You can specify a sound file to play if an alarm occurs whilst you are watching a live monitor stream. So long as your browser understands the format it does not need to be any particular type. This file should be placed in the /var/www/html/zm/sounds directory.", + type => $types{file}, + requires => [ { name => "ZM_WEB_SOUND_ON_ALARM", value => "yes" } ], + }, + { + name => "ZM_OPT_FAST_DELETE", + default => "yes", + description => "When deleting events should the client only delete the database records for speed", + help => "Normally an event created as the result of an alarm consists of entries in one or more database tables plus the various files associated with it. When deleting events in the browser it can take a long time to remove all of this if your are trying to do a lot of events at once. It is recommended that you set this option which means that the browser client only deletes the key entries in the events table, which means the events will no longer appear in listing, and leaves the zmaudit daemon to clear up the rest later.", + type => $types{boolean}, + }, + { + name => "ZM_SHM_KEY", + default => "0x7a6d2000", + description => "Shared memory key to use, only change if it clashes with another application", + help => "ZoneMinder uses shared memory to speed up communication between modules. To identify the right area to use shared memory keys are used. This option controls what the base key is, each monitor will have it's Id or'ed with this to get the actual key used.", + type => $types{hexadecimal}, + }, + { + name => "ZM_FILTER_RELOAD_DELAY", + default => "300", + description => "How often (in seconds) filters are reloaded in zmfilter.pl", + help => "ZoneMinder allows you to save filters to the database which allow events that match certain criteria to be deleted or uploaded to a remote machine. The zmfilter daemon loads these and does the deleting or uploading. This option determine how often the filters are reloaded to get the latest versions of the filters. If you don't change filters very often this can be quite large.", + type => $types{integer}, + }, + { + name => "ZM_OPT_UPLOAD", + default => "no", + description => "Should ZoneMinder try and upload events that match corresponding filters", + help => "In ZoneMinder you can create event filters that specify whether events that match certain criteria should be uploaded to a remote server for archiving. This option specifies whether this functionality should be available", + type => $types{boolean}, + }, + { + name => "ZM_UPLOAD_ARCH_FORMAT", + default => "tar", + description => "What format the uploaded events should be created in. This can be 'tar' or 'zip'", + requires => [ { name => "ZM_OPT_UPLOAD", value => "yes" } ], + help => "Uploaded events may be stored in either .tar or .zip format, this option specifies which. Note that to use this you will need to have the Archive::Tar and/or Archive::Zip perl modules installed.", + type => { hint => 'tar/zip', parse => sub { return( int($_[0] =~ /^([tz])/i ), $1 =~ /^t/ ? 'tar' : 'zip' ) } }, + }, + { + name => "ZM_UPLOAD_ARCH_COMPRESS", + default => "no", + description => "Should archive files be compressed", + help => "When the archive files are created they can be compressed. However in general since the images are compressed already this saves only a minimal amount of space versus utilising more CPU in their creation. Only enable if you have CPU to waste and are limited in disk space on your remote server or bandwidth", + requires => [ { name => "ZM_OPT_UPLOAD", value => "yes" } ], + type => $types{boolean}, + }, + { + name => "ZM_UPLOAD_ARCH_ANALYSE", + default => "no", + description => "Whether to include the analysis files in the archive, bigger but slower", + help => "When the archive files are created they can contain either just the captured frames or both the captured frames and for frames that caused an alarm the analysed image with the changed area highlighted. This option controls which to do. Only included analysed frames if you have a high bandwidth connection to the remote server or if you need help in figuring out what caused an alarm in the first place", + requires => [ { name => "ZM_OPT_UPLOAD", value => "yes" } ], + type => $types{boolean}, + }, + { + name => "ZM_UPLOAD_FTP_HOST", + default => "", + description => "The remote server to upload to", + requires => [ { name => "ZM_OPT_UPLOAD", value => "yes" } ], + help => "This is the remote machine that you wish to upload archived events to.", + type => $types{hostname}, + }, + { + name => "ZM_UPLOAD_FTP_USER", + default => "", + description => "Your ftp username", + requires => [ { name => "ZM_OPT_UPLOAD", value => "yes" } ], + type => $types{string}, + }, + { + name => "ZM_UPLOAD_FTP_PASS", + default => "", + description => "Your ftp password", + requires => [ { name => "ZM_OPT_UPLOAD", value => "yes" } ], + type => $types{string}, + }, + { + name => "ZM_UPLOAD_FTP_LOC_DIR", + default => "/tmp", + description => "The local directory in which to create upload files", + requires => [ { name => "ZM_OPT_UPLOAD", value => "yes" } ], + type => $types{abs_path}, + }, + { + name => "ZM_UPLOAD_FTP_REM_DIR", + default => "", + description => "The remote directory to upload to", + requires => [ { name => "ZM_OPT_UPLOAD", value => "yes" } ], + type => $types{rel_path}, + }, + { + name => "ZM_UPLOAD_FTP_TIMEOUT", + default => "120", + description => "How long (in seconds) we allow the transfer to take for each file", + requires => [ { name => "ZM_OPT_UPLOAD", value => "yes" } ], + type => $types{integer}, + }, + { + name => "ZM_UPLOAD_FTP_PASSIVE", + default => "yes", + description => "Whether to use passive ftp", + requires => [ { name => "ZM_OPT_UPLOAD", value => "yes" } ], + help => "If your computer is behind a firewall or proxy you may need to set FTP to passive mode. In fact for simple transfers it makes little sense to do otherwise anyway but you can set this to 'No' if you wish.", + type => $types{boolean}, + }, + { + name => "ZM_UPLOAD_FTP_DEBUG", + default => "yes", + description => "Whether to switch ftp debugging on", + requires => [ { name => "ZM_OPT_UPLOAD", value => "yes" } ], + help => "If you are having (or expecting) troubles with uploading archived events then setting this to 'yes' permits additional information to be included in the zmfilter log file.", + type => $types{boolean}, + }, + { + name => "ZM_WATCH_CHECK_INTERVAL", + default => "10", + description => "How often to check the capture daemons have not locked up", + help => "The zmwatch daemon checks the image capture performance of the capture daemons to ensure that they have not locked up (rarely a sync error may occur which blocks indefinately). This option determines how often the daemons are checked.", + type => $types{integer}, + }, + { + name => "ZM_WATCH_NUM_BAD_CHECKS", + default => "3", + description => "How many bad daemon checks before we restart", + help => "The zmwatch daemon checks the image capture performance of the capture daemons to ensure that they have not locked up (rarely a sync error may occur which blocks indefinately). This option determines how many consecutive checks a daemon should fail before being restarted. The default value of 3 allows periodic restarts of the daemons to be ignored by zmwatch.", + type => $types{integer}, + }, + { + name => "ZM_WATCH_MIN_FPS", + default => "0.5", + description => "The minimum FPS we will allow before restarting the capture daemons", + help => "The zmwatch daemon checks the image capture performance of the capture daemons to ensure that they have not locked up (rarely a sync error may occur which blocks indefinately). This option determines what the minimum number of captured frames per second is considered valid. Generally if a lockup occurs the FPS will go to zero but setting this slightly higher will permit slightly earlier detection.", + type => $types{decimal}, + }, + { + name => "ZM_FORCED_ALARM_SCORE", + default => "255", + description => "Score to give forced alarms", + help => "The 'zmu' utility can be used to force an alarm on a monitor rather than rely on the motion detection algorithms. This option determines what score to give these alarms to distinguish them from regular ones. It must be 255 or less.", + type => $types{integer}, + }, + { + name => "ZM_RECORD_EVENT_STATS", + default => "yes", + description => "Whether to record event statistical information, switch off if too slow", + help => "This version of ZoneMinder records detailed information about events in the Stats table. This can help in profiling what the optimum settings are for Zones though this is tricky at present. However in future releases this will be done more easily and intuitively, especially with a large sample of events. The default option of 'yes' allows this information to be collected now in readiness for this but if you are concerned about performance you can switch this off in which case no Stats information will be saved.", + type => $types{boolean}, + }, { name => "ZM_WEB_H_REFRESH_MAIN", default => "300", description => "How often (in seconds) the main console window should refresh itself", - introduction => "There are now a number of options that are grouped into bandwidth categories, this allows you to configure the ZoneMinder client to work optimally over the various access methods you might to access the client.\n\nThe next few options control what happens when the client is running in 'high' bandwidth mode. You should set these options for when accessing the ZoneMinder client over a local network or high speed link", - help => "The main console window lists a general status and the event totals for all monitors. This is not a trivial taks and should not be repeated too frequently or it may affect the performance of the rest of the system.", + introduction => "There are now a number of options that are grouped into bandwidth categories, this allows you to configure the ZoneMinder client to work optimally over the various access methods you might to access the client.\n\nThe next few options control what happens when the client is running in 'high' bandwidth mode. You should set these options for when accessing the ZoneMinder client over a local network or high speed link. In most cases the default values will be suitable as a starting point.", + help => "The main console window lists a general status and the event totals for all monitors. This is not a trivial task and should not be repeated too frequently or it may affect the performance of the rest of the system.", type => $types{integer}, }, { @@ -245,9 +430,9 @@ my @options = name => "ZM_WEB_M_REFRESH_MAIN", default => "300", description => "How often (in seconds) the main console window should refresh itself", - help => "The main console window lists a general status and the event totals for all monitors. This is not a trivial taks and should not be repeated too frequently or it may affect the performance of the rest of the system.", + help => "The main console window lists a general status and the event totals for all monitors. This is not a trivial task and should not be repeated too frequently or it may affect the performance of the rest of the system.", type => $types{integer}, - introduction => "The next few options control what happens when the client is running in 'medium' bandwidth mode. You should set these options for when accessing the ZoneMinder client over a slower cable or DSL link", + introduction => "The next few options control what happens when the client is running in 'medium' bandwidth mode. You should set these options for when accessing the ZoneMinder client over a slower cable or DSL link. In most cases the default values will be suitable as a starting point.", }, { name => "ZM_WEB_M_REFRESH_CYCLE", @@ -310,8 +495,8 @@ my @options = name => "ZM_WEB_L_REFRESH_MAIN", default => "300", description => "How often (in seconds) the main console window should refresh itself", - introduction => "The next few options control what happens when the client is running in 'low' bandwidth mode. You should set these options for when accessing the ZoneMinder client over a modem or slow link", - help => "The main console window lists a general status and the event totals for all monitors. This is not a trivial taks and should not be repeated too frequently or it may affect the performance of the rest of the system.", + introduction => "The next few options control what happens when the client is running in 'low' bandwidth mode. You should set these options for when accessing the ZoneMinder client over a modem or slow link. In most cases the default values will be suitable as a starting point.", + help => "The main console window lists a general status and the event totals for all monitors. This is not a trivial task and should not be repeated too frequently or it may affect the performance of the rest of the system.", type => $types{integer}, }, { @@ -375,8 +560,8 @@ my @options = name => "ZM_WEB_P_REFRESH_MAIN", default => "300", description => "How often (in seconds) the main console window should refresh itself", - introduction => "The next few options control what happens when the WAP client is being accessed over a mobile phone link. You should set these options for when accessing the ZoneMinder WAP client over a mobile dialup or GPRS link.", - help => "The main console window lists a general status and the event totals for all monitors. This is not a trivial taks and should not be repeated too frequently or it may affect the performance of the rest of the system.", + introduction => "The next few options control what happens when the WAP client is being accessed over a mobile phone link. You should set these options for when accessing the ZoneMinder WAP client over a mobile dialup or GPRS link. In most cases the default values will be suitable as a starting point.", + help => "The main console window lists a general status and the event totals for all monitors. This is not a trivial task and should not be repeated too frequently or it may affect the performance of the rest of the system.", type => $types{integer}, }, { @@ -386,165 +571,6 @@ my @options = help => "The live images from a monitor are viewed as a sequence of still images. This option determines how the image is refreshed. Though the images are small setting this at too frequent a value may rapidly consume a lot of bandwidth resource.", type => $types{integer}, }, - { - name => "ZM_PATH_IMAGES", - default => "/var/www/html/zm/images", - description => "Path to the images that the ZoneMinder client generates", - help => "ZoneMinder generates a myriad of images, mosty of which are associated with events. For those that aren't this is where they go.", - type => $types{abs_path}, - }, - { - name => "ZM_PATH_EVENTS", - default => "/var/www/html/zm/events", - description => "Path to the events that ZoneMinder generates", - type => $types{abs_path}, - }, - { - name => "ZM_PATH_LOGS", - default => "/tmp", - description => "Path to the various logs that the ZoneMinder daemons generate", - help => "There are various daemons that are used by ZoneMinder to perform various tasks. Most generate helpful log files and this is where they go. They can be deleted if not required for debugging.", - type => $types{abs_path}, - }, - { - name => "ZM_SHM_KEY", - default => "0x7a6d2000", - description => "Shared memory key to use, only change if it clashes with another application", - help => "ZoneMinder uses shared memory to speed up communication between modules. To identify the right area to use shared memory keys are used. This option controls what the base key is, each monitor will have it's Id or'ed with this to get the actual key used.", - type => $types{hexadecimal}, - }, - { - name => "ZM_FILTER_RELOAD_DELAY", - default => "300", - description => "How often (in seconds) filters are reloaded in zmfilter.pl", - help => "ZoneMinder allows you to save filters to the database which allow events that match certain criteria to be deleted or uploaded to a remote machine. The zmfilter daemon loads these and does the deleting or uploading. This option determine how often the filters are reloaded to get the latest versions of the filters. If you don't change filters very often this can be quite large.", - type => $types{integer}, - }, - { - name => "ZM_OPT_UPLOAD", - default => "no", - description => "Should ZoneMinder try and upload events that match corresponding filters", - help => "In ZoneMinder you can create event filters that specify whether events that match certain criteria should be uploaded to a remote server for archiving. This option specifies whether this functionality should be available", - type => $types{boolean}, - }, - { - name => "ZM_FILTER_ARCH_FORMAT", - default => "tar", - description => "What format the uploaded events should be created in. This can be 'tar' or 'zip'", - requires => [ { name => "ZM_OPT_UPLOAD", value => "Yes" } ], - help => "Uploaded events may be stored in either .tar or .zip format, this option specifies which. Note that to use this you will need to have the Archive::Tar and/or Archive::Zip perl modules installed.", - type => { hint => 'tar/zip', parse => sub { return( int($_[0] =~ /^([tz])/i ), $1 =~ /^t/ ? 'tar' : 'zip' ) } }, - }, - { - name => "ZM_FILTER_ARCH_COMPRESS", - default => "no", - description => "Should archive files be compressed", - help => "When the archive files are created they can be compressed. However in general since the images are compressed already this saves only a minimal amount of space versus utilising more CPU in their creation. Only enable if you have CPU to waste and are limited in disk space on your remote server or bandwidth", - requires => [ { name => "ZM_OPT_UPLOAD", value => "Yes" } ], - type => $types{boolean}, - }, - { - name => "ZM_FILTER_ARCH_ANALYSE", - default => "no", - description => "Whether to include the analysis files in the archive, bigger but slower", - help => "When the archive files are created they can contain either just the captured frames or both the captured frames and for frames that caused an alarm the analysed image with the changed area highlighted. This option controls which to do. Only included analysed frames if you have a high bandwidth connection to the remote server or if you need help in figuring out what caused an alarm in the first place", - requires => [ { name => "ZM_OPT_UPLOAD", value => "Yes" } ], - type => $types{boolean}, - }, - { - name => "ZM_FILTER_FTP_HOST", - default => "", - description => "The remote server to upload to", - requires => [ { name => "ZM_OPT_UPLOAD", value => "Yes" } ], - help => "This is the remote machine that you wish to upload archived events to.", - type => $types{hostname}, - }, - { - name => "ZM_FILTER_FTP_USER", - default => "", - description => "Your ftp username", - requires => [ { name => "ZM_OPT_UPLOAD", value => "Yes" } ], - type => $types{string}, - }, - { - name => "ZM_FILTER_FTP_PASS", - default => "", - description => "Your ftp password", - requires => [ { name => "ZM_OPT_UPLOAD", value => "Yes" } ], - type => $types{string}, - }, - { - name => "ZM_FILTER_FTP_LOC_DIR", - default => "/tmp/", - description => "The local directory in which to create upload files", - requires => [ { name => "ZM_OPT_UPLOAD", value => "Yes" } ], - type => $types{abs_path}, - }, - { - name => "ZM_FILTER_FTP_REM_DIR", - default => "", - description => "The remote directory to upload to", - requires => [ { name => "ZM_OPT_UPLOAD", value => "Yes" } ], - type => $types{rel_path}, - }, - { - name => "ZM_FILTER_FTP_TIMEOUT", - default => "120", - description => "How long (in seconds) we allow the transfer to take for each file", - requires => [ { name => "ZM_OPT_UPLOAD", value => "Yes" } ], - type => $types{integer}, - }, - { - name => "ZM_FILTER_FTP_PASSIVE", - default => "yes", - description => "Whether to use passive ftp", - requires => [ { name => "ZM_OPT_UPLOAD", value => "Yes" } ], - help => "If your computer is behind a firewall or proxy you may need to set FTP to passive mode. In fact for simple transfers it makes little sense to do otherwise anyway but you can set this to 'No' if you wish.", - type => $types{boolean}, - }, - { - name => "ZM_FILTER_FTP_DEBUG", - default => "yes", - description => "Whether to switch ftp debugging on", - requires => [ { name => "ZM_OPT_UPLOAD", value => "Yes" } ], - help => "If you are having (or expecting) troubles with uploading archived events then setting this to 'Yes' permits additional information to be included in the zmfilter log file.", - type => $types{boolean}, - }, - { - name => "ZM_WATCH_CHECK_INTERVAL", - default => "10", - description => "How often to check the capture daemons have not locked up", - help => "The zmwatch daemon checks the image capture performance of the capture daemons to ensure that they have not locked up (rarely a sync error may occur which blocks indefinately). This option determines how often the daemons are checked.", - type => $types{integer}, - }, - { - name => "ZM_WATCH_NUM_BAD_CHECKS", - default => "3", - description => "How many bad daemon checks before we restart", - help => "The zmwatch daemon checks the image capture performance of the capture daemons to ensure that they have not locked up (rarely a sync error may occur which blocks indefinately). This option determines how many consecutive checks a daemon should fail before being restarted. The default value of 3 allows periodic restarts of the daemons to be ignored by zmwatch.", - type => $types{integer}, - }, - { - name => "ZM_WATCH_MIN_FPS", - default => "0.5", - description => "The minimum FPS we will allow before restarting the capture daemons", - help => "The zmwatch daemon checks the image capture performance of the capture daemons to ensure that they have not locked up (rarely a sync error may occur which blocks indefinately). This option determines what the minimum number of captured frames per second is considered valid. Generally if a lockup occurs the FPS will go to zero but setting this slightly higher will permit slightly earlier detection.", - type => $types{decimal}, - }, - { - name => "ZM_FORCED_ALARM_SCORE", - default => "255", - description => "Score to give X10 forced alarms", - help => "The zmu utility can be used to force an alarm on a monitor rather than rely on the motion detection algorithms. This option determines what score to give these alarms to distinguish them from regular ones. It must be 255 or less.", - type => $types{integer}, - }, - { - name => "ZM_RECORD_EVENT_STATS", - default => "yes", - description => "Whether to record event statistical information, change to no if too slow", - help => "This version of ZoneMinder records detailed information about events in the Stats table. This can help in profiling what the optimum settings are for Zones though this is tricky at present. However in future releases this will be done more easily and intuitively, especially with a large sample of events. The default option of 'Yes' allows this information to be collected now in readiness for this but if you are concerned about performance you can switch this off in which case no Stats information will be saved.", - type => $types{boolean}, - }, ); my %options_hash = map { ( $_->{name}, $_ ) } @options; @@ -719,7 +745,7 @@ sub breaktext if ( $reprocess ) { #my @config_files = qw( src/zmcfg.h scripts/zmdc.pl scripts/zmwatch.pl web/zmconfig.php scripts/zmaudit.pl scripts/zmfilter.pl scripts/zmx10.pl ); - my @config_files = qw( zmcfg.h ); + my @config_files = qw( src/zmcfg.h web/zmconfig.php ); foreach my $config_file ( @config_files ) { @@ -771,11 +797,11 @@ if ( $reprocess ) || $opt_type == $types{decimal} || $opt_type == $types{hexadecimal} ) { - print $data =~ s/^(use\s+constant\s+$opt_name\s*=>\s*).*$/$1$opt_value;\t# $opt_desc \(from zmconfig\)/mg; + $data =~ s/^(use\s+constant\s+$opt_name\s*=>\s*).*$/$1$opt_value;\t# $opt_desc \(from zmconfig\)/mg; } else { - print $data =~ s/^(use\s+constant\s+$opt_name\s*=>\s*).*$/$1"$opt_value";\t# $opt_desc \(from zmconfig\)/mg; + $data =~ s/^(use\s+constant\s+$opt_name\s*=>\s*).*$/$1"$opt_value";\t# $opt_desc \(from zmconfig\)/mg; } } } @@ -814,6 +840,6 @@ if ( $reprocess ) open( CFG_FILE, ">$config_tmp_file" ) or die( "Can't open '$config_tmp_file' for writing" ); print( CFG_FILE $data ); close( CFG_FILE ); - #rename( $config_tmp_file, $config_file ) or warn( "Can't rename '$config_old_file' to '$config_file': $!" ); + rename( $config_tmp_file, $config_file ) or warn( "Can't rename '$config_tmp_file' to '$config_file': $!" ); } }