You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
787 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#!/bin/bash
# memclean by Pavel Belyaev 2014
# Данный скрипт поможет в случае отключения автозапуска mysql и apache
if [ `id -u` -gt 0 ]; then
echo "Запустите скрипт от имени суперпользователя, для этого введите sudo имя_скрипта";
exit;
fi
k ()
{
killall -9 $1
}
k_messengers ()
{
k 'Adium Viber Mail Skype'
}
startsrv ()
{
echo "Запускаем web-сервер!!!"
apachectl start
/usr/local/mysql/support-files/mysql.server start
}
stopsrv ()
{
echo "Останавливаем web-сервер"
apachectl stop
/usr/local/mysql/support-files/mysql.server stop
}
case $1 in
"start")startsrv;;
"stop")stopsrv;;
*)echo "Юзай start или stop!!!";;
esac