Last active
April 11, 2018 14:59
-
-
Save kevsersrca/272e8df9216dd98855639c7326897085 to your computer and use it in GitHub Desktop.
cxs setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kontrol=`wget -qO - - http://license.configserver.com/cgi-bin/cxs/check.cgi | awk {'print $1'}` | |
if [[ $kontrol == "Invalid" ]]; then | |
echo -e "CXS License Not Found" | |
elif [[ $kontrol != "Invalid" ]]; then | |
wget https://download.configserver.com/cxsinstaller.tgz | |
tar -xzf cxsinstaller.tgz | |
perl cxsinstaller.pl | |
rm -fv cxsinstaller.* | |
if [ ! -d /etc/init.d/csf ]; then | |
sed -i -e 's/LF_CXS = "0"/LF_CXS = "1"/g' /etc/csf/csf.conf | |
fi | |
touch /var/log/cxswatch.log | |
cxs --Wstart | |
mkdir /etc/cxs/karantina | |
chmod 777 /etc/cxs/karantina | |
cxs --qcreate --quarantine /etc/cxs/karantina | |
chkconfig cxswatch on | |
cxs --Wstart --www --all | |
if [ ! -d /etc/init.d/csf ]; then | |
sed -i -e "s/#CallUploadScript yes/CallUploadScript yes/g" /etc/pure-ftpd.conf | |
/etc/init.d/pure-uploadscript restart | |
fi | |
sed -i -e "s|/usr/sbin/cxs --quiet --ftp root|/usr/sbin/cxs -Z --ftp --qoptions Mmv -I /etc/cxs/cxs.ignore -Q /etc/cxs/karantina|g" /etc/cxs/cxsftp.sh | |
sed -i -e "s|/usr/sbin/cxs --options -wW --Wstart --allusers --www --mail root --Wmaxchild 3 --Wloglevel 0 --Wsleep 3 --filemax 0 --Wrateignore 300|/usr/sbin/cxs -$ | |
echo "0 4 * * * /usr/sbin/cxs --upgrade --quiet" >> /var/spool/cron/root | |
echo "0 1 * * * /usr/sbin/cxs -Z root --vopt mMfhexT -I /etc/cxs/cxs.ignore --qopt Mv -Q /etc/cxs/karantina --all" >> /var/spool/cron/root | |
/usr/sbin/cxs -Z root --vopt mMfhexT -I /etc/cxs/cxs.ignore --qopt Mv -Q /etc/cxs/karantina --all | |
echo -e "\e[42m$1Kurulum Tamamlandi..\e[0m" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment