Skip to content

Commit 878ae55

Browse files
authored
Fix/2020 10 always restart hestia service (hestiacp#1307)
* Restart hestia service always and bump php and nginx version. * Restart hestia service always and bump php and nginx version. * Set propper permission for postinst. * Set propper permission for postinst.
1 parent c999e78 commit 878ae55

File tree

5 files changed

+25
-3
lines changed

5 files changed

+25
-3
lines changed

src/deb/nginx/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Source: hestia-nginx
22
Package: hestia-nginx
33
Priority: optional
4-
Version: 1.19.2
4+
Version: 1.19.3
55
Section: admin
66
Maintainer: HestiaCP <info@hestiacp.com>
77
Homepage: https://www.hestiacp.com

src/deb/nginx/postinst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,9 @@ source /usr/local/hestia/conf/hestia.conf
2121
# Reset backend port
2222
if [ ! -z "$BACKEND_PORT" ]; then
2323
/usr/local/hestia/bin/v-change-sys-port $BACKEND_PORT
24+
fi
25+
26+
# Restart hestia service
27+
if [ -f "/etc/init.d/hestia" ]; then
28+
systemctl restart hestia > /dev/null 2>&1
2429
fi

src/deb/php/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Source: hestia-php
22
Package: hestia-php
33
Priority: optional
4-
Version: 7.4.10
4+
Version: 7.4.11
55
Section: admin
66
Maintainer: HestaCP <info@hestiacp.com>
77
Homepage: https://www.hestiacp.com

src/deb/php/postinst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
if [ "$1" != "configure" ]; then
6+
exit 0
7+
fi
8+
9+
# Restart hestia service
10+
if [ -f "/etc/init.d/hestia" ]; then
11+
systemctl restart hestia > /dev/null 2>&1
12+
fi

src/hst_autocompile.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,11 +366,16 @@ if [ "$PHP_B" = true ] ; then
366366
if [ -z "$use_src_folder" ]; then
367367
download_file $GIT_REP/php/control
368368
download_file $GIT_REP/php/copyright
369+
download_file $GIT_REP/php/postinst
369370
else
370371
cp $BUILD_DIR/hestiacp-$branch/src/deb/php/control ./
371372
cp $BUILD_DIR/hestiacp-$branch/src/deb/php/copyright ./
373+
cp $BUILD_DIR/hestiacp-$branch/src/deb/php/postinst ./
372374
fi
373375

376+
# Set permission
377+
chmod +x postinst
378+
374379
# Move php directory
375380
cd ..
376381
mv ${BUILD_DIR}/usr/local/hestia/php usr/local/hestia/
@@ -451,7 +456,7 @@ if [ "$HESTIA_B" = true ]; then
451456

452457

453458
# Set permission
454-
chmod +x postinst
459+
chmod 755 postinst
455460

456461
# Move needed directories
457462
cd $BUILD_DIR/hestiacp-$branch

0 commit comments

Comments
 (0)