Skip to content

Commit 3762b42

Browse files
author
Kristan Kenney
committed
Remove API index file if API access is set to no
1 parent 3f84ec3 commit 3762b42

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

install/upgrade/versions/1.4.0.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,11 @@ if [ -f /etc/apt/sources.list.d/postgresql.list ]; then
105105
echo "[ * ] Updating PostgreSQL repository..."
106106
sed -i 's|deb https://apt.postgresql.org/pub/repos/apt/|deb [arch=amd64] https://apt.postgresql.org/pub/repos/apt/|g' /etc/apt/sources.list.d/postgresql.list
107107
fi
108+
109+
# Remove API file if API is set to "no"
110+
if [ "$API" = "no" ]; then
111+
if [ -f "$HESTIA/web/api/index.php" ]; then
112+
echo "[ * ] Disabling API access..."
113+
$HESTIA/bin/v-change-sys-api remove
114+
fi
115+
fi

0 commit comments

Comments
 (0)