|
Server : LiteSpeed System : Linux srv104790275 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64 User : dewac4139 ( 1077) PHP Version : 8.0.30 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /var/lib/dpkg/info/ |
Upload File : |
#!/bin/bash
# preinst script for openlitespeed
#
# see: dh_installdeb(1)
#set -ex
#make sure the user lsadm and group lsadm exists in the system
getent group lsadm > /dev/null || groupadd -r lsadm
lsadm_gid=`grep ^lsadm: /etc/group | awk -F : '{ print $3; }'` >/dev/null 2>&1
getent passwd lsadm > /dev/null || useradd -g $lsadm_gid -d / -r -s /sbin/nologin -c "lsadm" lsadm >/dev/null 2>&1
grep -q nobody: "/etc/group"
if [ $? != 0 ] ; then
usermod -G lsadm,nogroup lsadm >/dev/null 2>&1
else
usermod -G lsadm,nobody lsadm >/dev/null 2>&1
fi
if [[ "$1" == 'upgrade' ]]; then
FILES_TO_IGNORE=( \
'/usr/local/lsws/conf/httpd_config.conf' \
'/usr/local/lsws/conf/mime.properties' \
'/usr/local/lsws/conf/vhosts/Example/htgroup' \
'/usr/local/lsws/conf/vhosts/Example/htpasswd' \
'/usr/local/lsws/conf/vhosts/Example/vhconf.conf' \
'/usr/local/lsws/conf/templates/ccl.conf' \
'/usr/local/lsws/conf/templates/phpsuexec.conf' \
'/usr/local/lsws/conf/templates/rails.conf' \
'/usr/local/lsws/adminpasswd' \
'/usr/local/lsws/fcgi-bin/lsphp' \
'/usr/local/lsws/admin/conf/admin_config.conf' \
'/usr/local/lsws/admin/conf/htpasswd' \
'/usr/local/lsws/admin/conf/jcryption_keypair' \
'/usr/local/lsws/admin/conf/webadmin.crt' \
'/usr/local/lsws/admin/conf/webadmin.key' \
'/usr/local/lsws/Example/cgi-bin/helloworld' \
'/usr/local/lsws/Example/html/error404.html' \
'/usr/local/lsws/Example/html/.htaccess' \
'/usr/local/lsws/Example/html/index.html' \
'/usr/local/lsws/Example/html/phpinfo.php' \
'/usr/local/lsws/Example/html/upload.html' \
'/usr/local/lsws/Example/html/upload.php' \
'/usr/local/lsws/Example/html/blocked/index.html' \
'/usr/local/lsws/Example/html/css/bootstrap.min.css' \
'/usr/local/lsws/Example/html/css/custom.css' \
'/usr/local/lsws/Example/html/img/404-icon.png' \
'/usr/local/lsws/Example/html/img/blocked_content-icon.png' \
'/usr/local/lsws/Example/html/img/cgi-icon.png' \
'/usr/local/lsws/Example/html/img/file_upload-icon.png' \
'/usr/local/lsws/Example/html/img/olsws_logo.png' \
'/usr/local/lsws/Example/html/img/php-icon.png' \
'/usr/local/lsws/Example/html/img/powered_by_ols-new.png' \
'/usr/local/lsws/Example/html/img/pwd_protect-icon.png' \
'/usr/local/lsws/Example/html/protected/index.html' \
'/usr/local/lsws/Example/logs/access.log' \
'/usr/local/lsws/PLAT' \
)
for FILE_TO_IGNORE in "${FILES_TO_IGNORE[@]}"; do
if [[ -f "${FILE_TO_IGNORE}" ]]; then
/usr/bin/dpkg-divert --list | grep -q "${FILE_TO_IGNORE}"
if [[ "$?" -ne 0 ]]; then
/usr/bin/dpkg-divert --local --add --divert "${FILE_TO_IGNORE}.dpkg" "${FILE_TO_IGNORE}" >/dev/null 2>&1
fi
fi
done
fi
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
exit 0