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
|
||||
print_status "Applying updated nginx configuration..."
|
||||
if [ -f "/etc/nginx/sites-available/forgejo" ]; then
|
||||
print_status "Copying updated nginx config..."
|
||||
sudo cp "$SCRIPT_DIR/forgejo-nginx.conf" "/etc/nginx/sites-available/forgejo"
|
||||
print_success "Nginx config updated"
|
||||
print_info "Script directory: $SCRIPT_DIR"
|
||||
print_info "Looking for nginx config: $SCRIPT_DIR/forgejo-nginx.conf"
|
||||
|
||||
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
|
||||
print_warning "Forgejo nginx config not found, copying..."
|
||||
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"
|
||||
print_error "Nginx config file not found at: $SCRIPT_DIR/forgejo-nginx.conf"
|
||||
print_error "Please ensure forgejo-nginx.conf exists in the same directory as this script"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check nginx configuration and reload
|
||||
|
|
|
|||
Loading…
Reference in a new issue