Skip to content

Commit 847650d

Browse files
committed
Add hooks before and after update
1 parent 8a67b18 commit 847650d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/deb/hestia/postinst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,9 @@ upgrade_send_notification_to_panel
9292
upgrade_send_notification_to_email
9393
upgrade_send_log_to_email
9494

95+
if [ -e "/etc/hestiacp/hooks/post_install.sh" ]; then
96+
echo "[ * ] Execute post install hook"
97+
/etc/hestiacp/hooks/post_install.sh
98+
fi
99+
95100
exit 0

src/deb/hestia/preinst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,9 @@ HESTIA_V=$(dpkg -s hestia | grep -i version | awk '{ print $2 }')
1818

1919
if [ ! "$HESTIA_V" = "$VERSION" ]; then
2020
sed -i "s/VERSION=.*/VERSION='$HESTIA_V'/g" /usr/local/hestia/conf/hestia.conf
21+
fi
22+
23+
if [ -e "/etc/hestiacp/hooks/pre_install.sh" ]; then
24+
echo "[ * ] Execute pre install hook"
25+
/etc/hestiacp/hooks/pre_install.sh
2126
fi

0 commit comments

Comments
 (0)