stuff
This commit is contained in:
parent
630d5e1f41
commit
86d48f70f5
1 changed files with 18 additions and 8 deletions
|
|
@ -148,15 +148,25 @@ fi
|
||||||
|
|
||||||
# Apply updated nginx configuration
|
# Apply updated nginx configuration
|
||||||
print_status "Applying updated nginx configuration..."
|
print_status "Applying updated nginx configuration..."
|
||||||
if [ -f "/etc/nginx/sites-available/forgejo" ]; then
|
print_info "Script directory: $SCRIPT_DIR"
|
||||||
print_status "Copying updated nginx config..."
|
print_info "Looking for nginx config: $SCRIPT_DIR/forgejo-nginx.conf"
|
||||||
sudo cp "$SCRIPT_DIR/forgejo-nginx.conf" "/etc/nginx/sites-available/forgejo"
|
|
||||||
print_success "Nginx config updated"
|
if [ -f "$SCRIPT_DIR/forgejo-nginx.conf" ]; then
|
||||||
|
print_success "Nginx config file found"
|
||||||
|
if [ -f "/etc/nginx/sites-available/forgejo" ]; then
|
||||||
|
print_status "Updating existing nginx config..."
|
||||||
|
sudo cp "$SCRIPT_DIR/forgejo-nginx.conf" "/etc/nginx/sites-available/forgejo"
|
||||||
|
print_success "Nginx config updated"
|
||||||
|
else
|
||||||
|
print_status "Installing new nginx config..."
|
||||||
|
sudo cp "$SCRIPT_DIR/forgejo-nginx.conf" "/etc/nginx/sites-available/forgejo"
|
||||||
|
sudo ln -sf "/etc/nginx/sites-available/forgejo" "/etc/nginx/sites-enabled/forgejo"
|
||||||
|
print_success "Nginx config installed"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
print_warning "Forgejo nginx config not found, copying..."
|
print_error "Nginx config file not found at: $SCRIPT_DIR/forgejo-nginx.conf"
|
||||||
sudo cp "$SCRIPT_DIR/forgejo-nginx.conf" "/etc/nginx/sites-available/forgejo"
|
print_error "Please ensure forgejo-nginx.conf exists in the same directory as this script"
|
||||||
sudo ln -sf "/etc/nginx/sites-available/forgejo" "/etc/nginx/sites-enabled/forgejo"
|
exit 1
|
||||||
print_success "Nginx config installed"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check nginx configuration and reload
|
# Check nginx configuration and reload
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue