#!/bin/bash if [ ! -f /var/run/lighttpd.pid ] then /etc/init.d/lighttpd start fi hades:/var/run# /root/check_lighttpd /root/check_lighttpd: line 2: [: !-f: unary operator expected Just added a space between the ! and -f