summarylogtreecommitdiffstats
path: root/zoneminder.install
diff options
context:
space:
mode:
Diffstat (limited to 'zoneminder.install')
-rw-r--r--zoneminder.install45
1 files changed, 27 insertions, 18 deletions
diff --git a/zoneminder.install b/zoneminder.install
index 53d1478c82b..0f294577ea0 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
}