summarylogtreecommitdiffstats
path: root/install
blob: d3cfe543cadc90a098e1919df75179f8b9238da4 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
note() {
        printf "${blue}==>${yellow} NOTE:${bold} $1${all_off}\n"
}

post_install() {
	getent group netflow &>/dev/null || groupadd -r -g 44 netflow >/dev/null
	getent passwd netflow &>/dev/null || useradd -r -u 44 -g netflow -d /var/lib/nfsen -s /bin/false -G netflow http >/dev/null
	usr/bin/systemd-tmpfiles --create nfsen.conf || true
        
        note "To complete the installation, run:"
        note "    cd /usr/share/webapps/nfsen"
        note "    su -c "./install.pl /etc/nfsen/nfsen.conf""
        note ""
        note "If you edited /etc/nfsen.conf you also need to run:"
        note "    cd /usr/share/webapps/nfsen"
        note "    su -c "./install.pl /etc/nfsen/nfsen.conf""
        note ""
        note "If you want to use the nginx to access the web, run:"
        note "    sudo pacman -S nginx php-fpm"
        note "    Edit /etc/php/php.ini:"
        note "    Remove comment from ";extension=sockets.so" string"
        note "    Set up virtualhost in nginx"
        note "    An example of the setting for nginx is in the file /usr/share/doc/nfsen/vhost-nginx.conf "
        note "    And run:"
        note "    sudo systemctl start nginx php-fpm"
        note ""
        note "If you are using a web server Apache you know what to do :)"
        note ""
        note ""
        note "To build a profile by protocols, run:"
        note "    sudo create_top_protocols --consumers 8 --divide-up-down --profile-name top_8_protocols"
        note ""
        note "To build a profile in the directions, run:"
        note "    sudo create_top_directions --consumers 10 --divide-up-down --profile-name top_10_directions"
        note ""
}

post_upgrade() {
        note "To complete the update, run:"
        note "    cd /usr/share/webapps/nfsen"
        note "    su -c "./install.pl /etc/nfsen/nfsen.conf""
        note ""
        note "If you edited /etc/nfsen.conf you also need to run:"
        note "    cd /usr/share/webapps/nfsen"
        note "    su -c "./install.pl /etc/nfsen/nfsen.conf""
        note ""
        note "If you want to use the nginx to access the web, run:"
        note "    sudo pacman -S nginx php-fpm"
        note "    Edit /etc/php/php.ini:"
        note "    Remove comment from ";extension=sockets.so" string"
        note "    Set up virtualhost in nginx"
        note "    An example of the setting for nginx is in the file /usr/share/doc/nfsen/vhost-nginx.conf "
        note "    And run:"
        note "    sudo systemctl start nginx php-fpm"
        note ""
        note "If you are using a web server Apache you know what to do :)"
        note ""
        note ""
        note "To build a profile by protocols, run:"
        note "    sudo create_top_protocols --consumers 8 --divide-up-down --profile-name top_8_protocols"
        note ""
        note "To build a profile in the directions, run:"
        note "    sudo create_top_directions --consumers 10 --divide-up-down --profile-name top_10_directions"
        note ""
}