ÿØÿà JFIF ÿÛ „ ( %"1"%)+...383,7(-.-
![]() Server : LiteSpeed System : Linux v2202501248978307069 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 User : voirf6718 ( 1002) PHP Version : 7.3.33-1+focal 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, Directory : /home/voirfilmshd-gratuit.site/ |
#!/bin/bash ## imunify email deploy script # Short Description :Deploy Imunify Email # Description :Installs Imunify Email Anti-Spam application # Copyright :Cloud Linux Zug GmbH # License :Cloud Linux Commercial License readonly PACKAGE="imunifyemail" readonly CENTOS_RELEASE_FILE=/etc/centos-release readonly CLOUDLINUX_RELEASE_FILE=/etc/cloudlinux-release readonly LOG_FILE=/var/log/imunifyemail-deploy.log #readonly LOCK=/var/log/ie-deploy.lock readonly CPANEL_INSTALL_DIR=/usr/local/cpanel readonly CPANEL_BIN="$CPANEL_INSTALL_DIR/cpanel" readonly SS_BIN=/usr/sbin/ss readonly TCP_PORTS="8443" prepend_timestamp() { # Prepend current time to each line # # Usage: source-program | prepend_timestamp # # Note: it may fail if the input contains \0 bytes while IFS= read -r line do printf '[%s] %s\n' "$(date '+%Y-%m-%d %H:%M:%S')" "$line" done } log() { # Run given command and append its duplicated stdout/stderr to # $LOG_FILE. # # Usage: log <command> [<args>...] # "$@" |& prepend_timestamp | tee -a "$LOG_FILE" return "${PIPESTATUS[0]}" } exit_with_error() { log echo "$@" rm -rf "$lock" exit 1 } print_debug_info() { if [ "$DEBUG" == "true" ]; then echo "$@" fi } check_panel() { if [ -f $CPANEL_BIN ]; then log echo "cPanel: " `$CPANEL_BIN -V` else exit_with_error "Error during install: cPanel isn't detected $CPANEL_BIN" fi } check_os() { echo -n "Checking OS version ....." if [ -f $CENTOS_RELEASE_FILE ] ; then osfile=$CENTOS_RELEASE_FILE col=4 os_id="CentOS" elif [ -f $CLOUDLINUX_RELEASE_FILE ] ; then osfile=$CLOUDLINUX_RELEASE_FILE col=3 os_id="CloudLinux" fi if [ -z `cat $osfile | awk "{ print \$$col }" | grep -e "^7" -e "^8" ` ] ; then echo -n "$os_id " cat $osfile | awk "{ print \$$col }" else exit_with_error "Wrong OS detected. Only CentOS 7,8 or CloudLinux 7,8 are supported" fi } check_exim() { if EXIM_BIN=`which exim 2>&1` ; then # log `exim --version` # commented out for a while log echo $EXIM_BIN else exit_with_error "No exim binary in PATH detected" fi } version_greater_equal() { printf '%s\n%s\n' "$2" "$1" | sort --check=quiet --version-sort } check_imunify() { if I360_BIN=`which imunify360-agent 2>&1` ; then I360_VERSION="$($I360_BIN version)" log echo "Imunify360 version: $I360_VERSION" if ! version_greater_equal $I360_VERSION 6.2 ; then log echo "!!!!! Imunify 360 Version must be 6.2 or greater. Please update using following command and try again: " log echo "yum update -y imunify360-firewall" exit_with_error "Incorrect Imunify 360 version" fi if [ -f /var/imunify360/license.json ] ; then chmod g+r /var/imunify360/license.json fi else exit_with_error "No Imunify 360 Agent found" fi } install_packages () { log echo "Installing packages" _EXTRA_GROUPS="" if getent group mail >/dev/null ; then _EXTRA_GROUPS="-G mail" fi # XXX on some systems (CentOS 7, CLOS 7) nobody user id=99, together # with cPanel exim configuration this prevents the _imunifyemail user # from sending messages. Enforce uid(_imunifyemail) < uid(nobody) _useradd_uid_flag=$(getent passwd nobody | head -1 \ | awk -F: '{if ($3 == 99) { print "-u 57" } else { print "-r" }}') getent passwd _imunifyemail >/dev/null || \ useradd "$_useradd_uid_flag" -g _imunify ${_EXTRA_GROUPS} \ -d /var/imunifyemail -s /sbin/nologin \ -c "& user" _imunifyemail log yum install -y $PACKAGE } check_ports() { if [ -x $SS_BIN ] ; then _cports=$($SS_BIN -lntH | awk -v ports="$TCP_PORTS" ' BEGIN { split(ports, pa, " "); } { sub("^.*:", "", $4); oph[$4]++; } END { for (i in pa) { if (pa[i] in oph) printf("%s ", pa[i]); } }') if [ -n "$_cports" ] ; then log echo "!!! Possible conflict detected on TCP port(s): $_cports" return 1 fi else log echo "!!! Unable to verify TCP ports availability: $SS_BIN not found" return 1 fi return 0 } autoconf_imunifyemail() { if check_ports ; then log ie-config -v install && log echo "The ImunifyEmail installed successfully!" else log echo "The ImunifyEmail was installed, but still disabled." log echo "Please use ie-config utility to complete manual configuration." fi } # Check prerequisites # OS #check_os # cPanel check_panel # Exim check_exim # Imunify 360 check_imunify # Install RPMs install_packages # Start the IE autoconf_imunifyemail