diff --git a/ct/fumadocs.sh b/ct/fumadocs.sh index 86e8ac9..3171015 100644 --- a/ct/fumadocs.sh +++ b/ct/fumadocs.sh @@ -25,9 +25,39 @@ function update_script() { check_container_resources if [[ ! -d /opt/fumadocs ]]; then - msg_error "No Installation Found!" - exit + msg_error "No installation found in /opt/fumadocs!" + exit 1 fi + + if [[ ! -f /opt/fumadocs/.projectname ]]; then + msg_error "Project name file not found: /opt/fumadocs/.projectname!" + exit 1 + fi + + PROJECT_NAME=$(/opt/fumadocs/.projectname msg_ok "Installed Fumadocs" msg_info "Creating Service" -PROJECT_NAME=$(find . -maxdepth 1 -type d ! -name '.' ! -name '..' | sed 's|^\./||') cat </etc/systemd/system/fumadocs_$PROJECT_NAME.service [Unit] Description=Fumadocs Documentation Server