File: nginx-naxsi-ui.postinst

package info (click to toggle)
nginx 1.2.1-2.2%2Bwheezy4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 36,644 kB
  • sloc: ansic: 126,205; python: 1,695; sh: 1,018; perl: 523; makefile: 283; php: 122; asm: 48; ruby: 31; cpp: 17
file content (33 lines) | stat: -rw-r--r-- 553 bytes parent folder | download
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
#!/bin/bash
# postinst maintainer script for nginx-naxsi-ui

set -e

. /usr/share/debconf/confmodule
. /usr/share/dbconfig-common/dpkg/postinst.mysql

dbc_go nginx-naxsi-ui $@

. /etc/dbconfig-common/nginx-naxsi-ui.conf

db_get nginx-naxsi-ui/mysql/app-pass && dbpassword=$RET
db_get nginx-naxsi-ui/dbhost && dbhost=$RET

cat << EOF > /etc/nginx/naxsi-ui.conf
[mysql]
username=naxsi_ui
password=$dbc_dbpass
hostname=$dbhost
dbname=naxsi_ui

[nx_extract]
port = 8081
rules_path=/etc/nginx/naxsi.rules

[nx_intercept]
port = 8080
EOF

#DEBHELPER#

exit 0