HEX
Server: Apache/2.4.63 (Unix)
System: Linux TOMS-220NAS 4.4.302+ #86009 SMP Wed Nov 26 18:19:17 CST 2025 x86_64
User: flavio87 (1026)
PHP: 8.3.27
Disabled: NONE
Upload Files
File: //var/packages/Apache2.4/scripts/postinst
#!/bin/bash

. "$(dirname "$0")/common"
DO_LINK

LOGFILE="/var/log/httpd/apache24*"
VARDIR="/var/packages/Apache2.4/var"

config_root_path=/usr/local/etc/apache24/
conf_path_dir="conf-available conf-enabled sites-available sites-enabled"

for dir in $conf_path_dir; do
	/usr/bin/mkdir -p "$config_root_path$dir"
done

#Migrate log from root to volume
if [ -h "${VARDIR}" ]; then
    mkdir -p "${VARDIR}/log"
    if compgen -G $LOGFILE > /dev/null; then 
        /usr/bin/mv $LOGFILE "${VARDIR}/log/"
    fi
fi

exit 0