This commit is contained in:
Johanna Rührig 2025-01-01 13:48:05 +01:00
parent 2c4add0a78
commit 1b9dfc3794
2 changed files with 12 additions and 9 deletions

View File

@ -69,9 +69,9 @@ function update_script() {
msg_ok "Updated $APP to ${RELEASE}"
# Starting httpd
msg_info "Starting httpd"
httpd-foreground
msg_ok "Started httpd"
msg_info "Starting apache"
apache2ctl start
msg_ok "Started apache"
else
msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi

View File

@ -21,7 +21,8 @@ $STD apt-get install -y \
sudo \
git \
jq \
apache2
apache2 \
unzip
msg_ok "Installed Dependencies"
@ -32,12 +33,14 @@ echo "<Location /server-status>\n"\
" Order deny,allow\n"\
" Allow from all\n"\
"</Location>\n"\
>> /usr/local/apache2/conf/httpd.conf
>> /etc/apache2/apache2.conf
rm /usr/local/apache2/htdocs/index.html
rm -rf /var/www/html
RELEASE=$(curl -s https://api.github.com/repos/5etools-mirror-3/5etools-src/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
wget -q "https://github.com/5etools-mirror-3/5etools-src/archive/refs/tags/${RELEASE}.zip"
unzip -q "${RELEASE}.zip"
mv "${APP}-src-${RELEASE}/" "/opt/${APP}"
ln -s "/opt/${APP}" /var/www/html
chown -R www-data: "/opt/${APP}"
chmod -R 755 "/opt/${APP}"
@ -48,9 +51,9 @@ rm -rf "v${RELEASE}.zip"
msg_ok "Setup 5etools"
# Starting httpd
msg_info "Starting httpd"
httpd-foreground
msg_ok "Started httpd"
msg_info "Starting apache"
apache2ctl start
msg_ok "Started apache"
motd_ssh
customize