updated backups solution

This commit is contained in:
Quality System Admin
2025-11-03 22:18:56 +02:00
parent 1ade0b5681
commit 9c19379810
17 changed files with 3105 additions and 50 deletions

View File

@@ -35,10 +35,19 @@ echo "=============================================="
# Check if we're in the right directory
if [[ ! -f "wsgi.py" ]]; then
print_error "Please run this script from the py_app directory"
print_error "Expected location: /srv/quality_recticel/py_app"
print_error "Expected location: /srv/quality_app/py_app or /srv/quality_recticel/py_app"
exit 1
fi
# Detect which installation we're running from
if [[ "$PWD" == *"/quality_app/"* ]]; then
LOG_DIR="/srv/quality_app/logs"
PROJECT_NAME="quality_app"
else
LOG_DIR="/srv/quality_recticel/logs"
PROJECT_NAME="quality_recticel"
fi
print_step "Checking Prerequisites"
# Check if virtual environment exists
@@ -134,8 +143,9 @@ if [[ -f "$PID_FILE" ]]; then
echo "📋 Server Information:"
echo " • Process ID: $PID"
echo " • Configuration: gunicorn.conf.py"
echo " • Access Log: /srv/quality_recticel/logs/access.log"
echo " • Error Log: /srv/quality_recticel/logs/error.log"
echo "Project: $PROJECT_NAME"
echo "Access Log: $LOG_DIR/access.log"
echo " • Error Log: $LOG_DIR/error.log"
echo ""
echo "🌐 Application URLs:"
echo " • Local: http://127.0.0.1:8781"
@@ -147,14 +157,14 @@ if [[ -f "$PID_FILE" ]]; then
echo ""
echo "🔧 Management Commands:"
echo " • Stop server: kill $PID && rm $PID_FILE"
echo " • View logs: tail -f /srv/quality_recticel/logs/error.log"
echo " • Monitor access: tail -f /srv/quality_recticel/logs/access.log"
echo " • View logs: tail -f $LOG_DIR/error.log"
echo " • Monitor access: tail -f $LOG_DIR/access.log"
echo " • Server status: ps -p $PID"
echo ""
print_warning "Server is running in daemon mode (background)"
else
print_error "Failed to start application. Check logs:"
print_error "tail /srv/quality_recticel/logs/error.log"
print_error "tail $LOG_DIR/error.log"
exit 1
fi
else