Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # If process not exist
- if [ `ps ax|grep squid|grep -v grep|wc -l` = 0 ]; then
- echo "Squid is down. Starting"
- /usr/local/squid/sbin/squid
- fi
- #-=-=-=-=-=-=-=-=-
- if [ ! `pgrep -f "memcached.*128" >/dev/null` ];then /usr/sbin/memcached; fi
- #-=-=-=-=-=-=-=-=-
- pgrep -f "memcached.*128" >/dev/null || /usr/sbin/memcached
- # If file exist
- zpid=/var/tmp/zabbix_agentd.аpid
- if [ -f $zpid ]; then
- rm -f $zpid
- fi
- # If variable is empty:
- if [ -z ${HOSTS} ]
- # If variable found:
- if [[ "${PREPARING_COMMAND}" ]]
- # If 1 OR 2
- if [ -z ${HOSTS[$i]#*:} ] || [ ${HOSTS[$i]#*:} == "ALL" ]
- # If 1 AND 2
- if (( $time >= 8 )) && (( $time <= 12 ))
- # If substring found
- msg="test test PROBLEM asd asd"
- if [[ "$msg" == *PROBLEM* ]]
- then
- echo bla
- fi
- # Case
- case "$1" in
- start)
- echo "Starting"
- ;;
- stop)
- echo "Stopping"
- ;;
- reload)
- ;;
- restart|force-reload)
- echo "Restarting"
- ;;
- *)
- echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}" >&2
- ;;
- esac
Advertisement
Add Comment
Please, Sign In to add comment