diff options
author | Alexandros Michalopoulos | 2018-10-16 15:59:57 +0300 |
---|---|---|
committer | Alexandros Michalopoulos | 2018-10-16 15:59:57 +0300 |
commit | 821b2eff44c8378ab3092657fc1abf8dac8321f3 (patch) | |
tree | 274fa9513730b01a81a3f56a7831a747a64e461b /zoneminder.install | |
parent | 96fa328b1970235db4d477133be38670d105c81e (diff) | |
download | aur-821b2eff44c8378ab3092657fc1abf8dac8321f3.tar.gz |
v=1.32.2,r=3 - Added spawn-fcgi & multiwatch to the mix so ZoneMinder can utilize more than 1 simultaneous CGI threads when running on Nginx
Diffstat (limited to 'zoneminder.install')
-rw-r--r-- | zoneminder.install | 45 |
1 files changed, 27 insertions, 18 deletions
diff --git a/zoneminder.install b/zoneminder.install index 53d1478c82b3..0f294577ea0a 100644 --- a/zoneminder.install +++ b/zoneminder.install @@ -78,7 +78,18 @@ post_install() { then systemctl is-active --quiet fcgiwrap.socket && systemctl stop fcgiwrap.socket systemctl is-active --quiet fcgiwrap && systemctl stop fcgiwrap - systemctl start fcgiwrap.socket + systemctl is-active --quiet fcgiwrap-multiwatch && systemctl stop fcgiwrap-multiwatch + systemctl start fcgiwrap-multiwatch && + { + echo "---------------" + echo + echo "fcgiwrap has been launched in multiple parallel instances via spawn-fcgi and multiwatch." + echo + echo "The default number of 10 instances should be enough for ZoneMinder to operate with 2 or 3 cameras" + echo "under normal circumstances. If you need more than 10 simultaneous CGI threads, edit the provided" + echo "fcgiwrap-multiwatch.service file and increase the number of instances to whatever suits your needs." + echo + } fi @@ -118,11 +129,11 @@ post_install() { if [[ "$(mysql -uroot -e "select * from mysql.user;" 2>&1)" = *"Access denied"* ]] then # If a database root password is set - echo \* Secure MariaDB installation found, please enter the database root password. + echo "* Secure MariaDB installation found, please enter the database root password." echo mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql echo - echo \* Enter the password one more time... + echo "* Enter the password one more time..." echo mysql -uroot -p -e "grant select,insert,update,delete,create,alter,index,lock tables on zm.* to 'zmuser'@localhost identified by 'zmpass';" echo @@ -139,29 +150,27 @@ post_install() { systemctl is-active --quiet zoneminder && systemctl stop zoneminder systemd-tmpfiles --create - systemctl start zoneminder - - - echo --------------- + systemctl start zoneminder && + { + echo "---------------" echo if [[ "$(systemctl is-active nginx)" = active ]] || [[ "$(systemctl is-active httpd)" = active ]] then - echo ZoneMinder is listening at http://localhost:8095 + echo "ZoneMinder is listening at http://localhost:8095" else - echo WARNING: No web server has been configured. + echo "WARNING: ZoneMinder is running, but no web server has been configured." fi - echo + } } post_upgrade() { post_install - echo --------------- + echo "---------------" echo - - echo The ZoneMinder updater will now run. + echo "The ZoneMinder updater will now run." # Make sure ZoneMinder is *not* running before we attempt to use the updater systemctl is-active --quiet zoneminder && systemctl stop zoneminder @@ -176,7 +185,7 @@ post_upgrade() { systemctl start zoneminder - echo Update complete. + echo "Update complete." echo } @@ -206,12 +215,12 @@ post_remove() { if [ -d /var/lib/mysql/zm ] then echo - echo ZoneMinder\'s database and user have been left intact. You can remove them by running the following: + echo "ZoneMinder's database and user have been left intact. You can remove them by running the following:" echo - echo mysql -uroot -p -e \"drop database zm\;\" - echo mysql -uroot -p -e \"drop user \'zmuser\'@localhost\;\" + echo "mysql -uroot -p -e \"drop database zm;\"" + echo "mysql -uroot -p -e \"drop user 'zmuser'@localhost;\"" echo - echo If you haven\'t yet configured a password for the database root user, omit the \'-p\' option. + echo "If you haven't yet configured a password for the database root user, omit the '-p' option." echo fi } |