I have a very simple shell script to stop the Apache server:
#!/bin/bash sudo /usr/sbin/httpd -k stop
I named it "StopApache.sh". When I run it from the command line, it stops Apache. However, when I double click the "StopApache.sh" icon on the Desktop, I'm asked whether I want to run or display it, I pick "Run", but the Apache Server doesn't stop.
How do I get a script which successfully executes at the command line to run when clicked?
I'm running CentOS 2.16.0.