HEX
Server: nginx/1.18.0
System: Linux hqnl0246134.online-vm.com 5.4.0-135-generic #152-Ubuntu SMP Wed Nov 23 20:19:22 UTC 2022 x86_64
User: www-data (33)
PHP: 7.4.33
Disabled: phpinfo,disk_free_space,disk_total_space,diskfreespace,dl,exec,opcache_get_configuration,opcache_get_status,passthru,pclose,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_waitpid,pcntl_wait,pcntl_wexitstatus,pcntl_wifcontinued,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,popen,posix_getpwuid,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,posix_uname,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,show_source,system,exec,passthru,shell_exec,system,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source
Upload Files
File: /var/lib/dpkg/info/imunify360-webshield-bundle.preinst
#!/bin/sh
# preinst script for imunify360-webshield-bundle
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
#        * <new-preinst> `install'
#        * <new-preinst> `install' <old-version>
#        * <new-preinst> `upgrade' <old-version>
#        * <old-preinst> `abort-upgrade' <new-version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in
    install)
        getent group imunify360-webshield >/dev/null || groupadd -r imunify360-webshield
        getent passwd imunify360-webshield >/dev/null || \
            useradd -r -g imunify360-webshield -s /usr/sbin/nologin \
            -d /var/cache/imunify360-webshield -c "imunify360-webshield user" imunify360-webshield
        exit 0
    ;;
    upgrade)
    CONF_FILE="/etc/imunify360-webshield/whitelisted-domains.conf"
    BACKUP_FILE="/etc/imunify360-webshield/whitelisted-domains.conf.imunify360-backup"
    if [ -f "$CONF_FILE" ]; then
        cp -v "$CONF_FILE" "$BACKUP_FILE"
    fi

    WSCHK=/etc/imunify360-webshield/wscheck.conf
    if [ -d /usr/share/imunify360-webshield ]; then
        if [ -e $WSCHK ]; then
            cp $WSCHK /usr/share/imunify360-webshield/.wscheck.conf
        fi
    fi

    # Saving user captcha customizations if any
    mkdir -p /usr/share/imunify360-webshield/.captcha_mods
    cp --preserve=timestamps /usr/share/imunify360-webshield/captcha/templates/head.tpl /usr/share/imunify360-webshield/.captcha_mods
    cp --preserve=timestamps /usr/share/imunify360-webshield/captcha/templates/body.tpl /usr/share/imunify360-webshield/.captcha_mods
    cp -r --preserve=timestamps /usr/share/imunify360-webshield/captcha/static /usr/share/imunify360-webshield/.captcha_mods


    if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
        dpkg-maintscript-helper rm_conffile /etc/imunify360-webshield/webshield-http.conf.d/wscheck.conf 1.8-18 -- "$@"
    fi

    if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
        dpkg-maintscript-helper rm_conffile /etc/imunify360-webshield/webshield-http.conf.d/wsuserid.conf 1.7-5 -- "$@"
    fi

    ;;
    abort-upgrade)
    ;;

    *)
        echo "preinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.



exit 0