case "$1" in
start)
is_running=`ps ax | awk '{ print \$5 }' | grep Xorg` || true
- if [ "${is_running}" = "" ]; then
+ if [ "${is_running}" = "" ]; then
echo "Starting Xorg server..."
/usr/bin/startx
else
;;
restart|reload|force-reload)
- is_running=`ps ax | awk '{ print \$5 }' | grep Xorg` || true
- if [ "${is_running}" != "" ]; then
+ is_running=`ps ax | awk '{ print \$5 }' | grep Xorg` || true
+ if [ "${is_running}" != "" ]; then
$0 stop || true
sleep 3
fi
stop)
is_running=`ps ax | awk '{ print \$5 }' | grep Xorg` || true
- if [ "${is_running}" != "" ]; then
+ if [ "${is_running}" != "" ]; then
echo "Stopping Xorg server..."
killall -9 Xorg
else