From 1b9dfc37947e84b335a2e9a2cfcdb9a68dc830bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20R=C3=BChrig?= Date: Wed, 1 Jan 2025 13:48:05 +0100 Subject: [PATCH] Debug. --- ct/5etools.sh | 6 +++--- install/5etools-install.sh | 15 +++++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ct/5etools.sh b/ct/5etools.sh index caade258..07c16d75 100644 --- a/ct/5etools.sh +++ b/ct/5etools.sh @@ -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 diff --git a/install/5etools-install.sh b/install/5etools-install.sh index 18356f20..dddda936 100644 --- a/install/5etools-install.sh +++ b/install/5etools-install.sh @@ -21,7 +21,8 @@ $STD apt-get install -y \ sudo \ git \ jq \ - apache2 + apache2 \ + unzip msg_ok "Installed Dependencies" @@ -32,12 +33,14 @@ echo "\n"\ " Order deny,allow\n"\ " Allow from all\n"\ "\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