Skip to content

Commit

Permalink
nginx: check for broken symlinks in /etc/nginx/sites-enabled (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
sikmir authored Aug 6, 2024
1 parent 531fe37 commit b6f1bb0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions configs/etc/wb-configs.d/04nginx-fix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/usr/lib/wb-configs/fix_nginx.sh
12 changes: 12 additions & 0 deletions configs/usr/lib/wb-configs/fix_nginx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

SITES_ENABLED_DIR="/etc/nginx/sites-enabled"

for config in "$SITES_ENABLED_DIR"/*; do
if [ -L "$config" ]; then
if [ ! -e "$config" ]; then
echo "Removing broken symlink: $config"
rm -f "$config"
fi
fi
done
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
wb-configs (3.27.1) stable; urgency=medium

* nginx: check for broken symlinks in /etc/nginx/sites-enabled

-- Nikolay Korotkiy <[email protected]> Mon, 05 Aug 2024 13:15:00 +0400

wb-configs (3.27.0) stable; urgency=medium

* add watchdog service script to check emmc health
Expand Down

0 comments on commit b6f1bb0

Please sign in to comment.