Skip to content

Commit 552c12d

Browse files
author
Kristan Kenney
committed
Merge branch 'main' into feature/statistics-page
2 parents d2abb92 + 0d125e8 commit 552c12d

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

bin/v-change-sys-api

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,17 @@ check_hestia_demo_mode
3535
#----------------------------------------------------------#
3636

3737
if [ "$status" = "enable" ]; then
38-
if [ $API = "no" ]; then
39-
if [ ! -f "$HESTIA/web/api/index.php" ]; then
40-
wget -q https://raw.githubusercontent.com/hestiacp/hestiacp/release/web/api/index.php -O $HESTIA/web/api/index.php
41-
else
42-
sed -i 's|die("Error: Disabled");|//die("Error: Disabled");|g' $HESTIA/web/api/index.php
43-
fi
44-
$HESTIA/bin/v-change-sys-config-value "API" "yes"
38+
if [ ! -f "$HESTIA/web/api/index.php" ]; then
39+
wget -q https://raw.githubusercontent.com/hestiacp/hestiacp/release/web/api/index.php -O $HESTIA/web/api/index.php
40+
else
41+
sed -i 's|die("Error: Disabled");|//die("Error: Disabled");|g' $HESTIA/web/api/index.php
42+
sed -i 's|////|//|g' $HESTIA/web/api/index.php
4543
fi
44+
$HESTIA/bin/v-change-sys-config-value "API" "yes"
4645
else
47-
if [ $API = "yes" ]; then
48-
$HESTIA/bin/v-change-sys-config-value "API" "no"
49-
$HESTIA/bin/v-change-sys-config-value "API_ALLOWED_IP" ""
50-
sed -i 's|//die("Error: Disabled");|die("Error: Disabled");|g' $HESTIA/web/api/index.php
51-
fi
46+
$HESTIA/bin/v-change-sys-config-value "API" "no"
47+
$HESTIA/bin/v-change-sys-config-value "API_ALLOWED_IP" ""
48+
sed -i 's|//die("Error: Disabled");|die("Error: Disabled");|g' $HESTIA/web/api/index.php
5249
fi
5350

5451
#----------------------------------------------------------#

src/hst_autocompile.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,10 @@ if [ "$HESTIA_B" = true ]; then
589589

590590
# Set permissions
591591
find $BUILD_DIR_HESTIA/usr/local/hestia/ -type f -exec chmod -x {} \;
592+
593+
# Allow send email via /usr/local/hestia/web/inc/mail-wrapper.php via cli
594+
chmod +x $BUILD_DIR_HESTIA/usr/local/hestia/web/inc/mail-wrapper.php
595+
# Allow the executable to be executed
592596
chmod +x $BUILD_DIR_HESTIA/usr/local/hestia/bin/*
593597
chown -R root:root $BUILD_DIR_HESTIA
594598

0 commit comments

Comments
 (0)