Skip to content

Commit 4334e99

Browse files
committed
Implement reset backend port function to nginx package.
1 parent e6c69da commit 4334e99

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/deb/nginx/postinst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
set -e
44

@@ -9,3 +9,16 @@ fi
99
# Touch and set permisions on default log files on installation
1010
update-rc.d hestia defaults >/dev/null
1111
invoke-rc.d hestia start || true
12+
13+
# Run triggers only on updates
14+
if [ ! -e "/usr/local/hestia/data/users/admin" ]; then
15+
exit
16+
fi
17+
18+
# Load hestia.conf
19+
source /usr/local/hestia/conf/hestia.conf
20+
21+
# Reset backend port
22+
if [ ! -z "$BACKEND_PORT" ]; then
23+
/usr/local/hestia/bin/v-change-sys-port $BACKEND_PORT
24+
fi

0 commit comments

Comments
 (0)