summarylogtreecommitdiffstats
path: root/zoneminder.install
blob: 986c99774847778a6f476b106692ea5edc8460f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
post_install() {
    echo
    echo "   ZoneMinder has been installed but some additional steps are required:"
    echo
    echo "1) You will need to install a MySQL-compatible database server and create a database and user"
    echo "   for ZoneMinder's use."
    echo
    echo "2) You will need to install a web server and configure it to serve ZoneMinder's web interface,"
    echo "   located at /usr/share/webapps/zoneminder/. Premade configurations are provided for Apache and"
    echo "   Nginx; you can find them at /etc/httpd/conf/extra for Apache and /etc/nginx/sites-available for"
    echo "   Nginx."
    echo
    echo "3) If you choose to use Nginx, you will also need to install fcgiwrap, spawn-fcgi and multiwatch"
    echo "   and then start the following systemd service (provided by this package):"
    echo
    echo "   * fcgiwrap-multiwatch.service"
    echo
    echo "4) After the previous steps are complete, you will also need to refresh systemd's tmpfiles."
    echo
    echo
    echo "   More information on how to setup and use ZoneMinder can be obtained at the following links:"
    echo
    echo "   * https://wiki.archlinux.org/title/ZoneMinder"
    echo "   * https://zoneminder.readthedocs.io/en/latest/"
    echo
}

post_upgrade() {
    echo
    echo "ZoneMinder's database needs to be updated. As the root user, run the following:"
    echo
    echo "/usr/bin/zmupdate.pl --nointeractive"
    echo "/usr/bin/zmupdate.pl --nointeractive --freshen > /dev/null 2>&1"
    echo    
    echo "To also update the PTZ camera control presets, run the following:"
    echo
    echo "/usr/bin/zmcamtool.pl --import > /dev/null 2>&1"
    echo
}

post_remove() {
    echo
    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
    echo "If you haven't yet configured a password for the database root user, omit the '-p' option."
    echo
}