Added mod_rewrite for nginx module

This commit is contained in:
alexey
2026-03-23 01:15:59 +03:00
commit 0d2c6277e1
124 changed files with 11079 additions and 0 deletions

24
packages/deb/postinst Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
# Pre-installation script - check nginx is available
set -e
if ! command -v dpkg >/dev/null 2>&1; then
echo "dpkg not found." >&2
exit 1
fi
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
# Verify nginx is installed before proceeding
if ! command -v nginx >/dev/null 2>&1; then
echo "nginx is required for nginx-mod-rewrite." >&2
exit 1
fi
# Check nginx module configuration directory exists
if [ ! -d /etc/nginx/modules ]; then
mkdir -p /etc/nginx/modules || true
fi
fi
exit 0