0

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.

4
Contributors
3
Replies
5
Views
8 Years
Discussion Span
Last Post by jolies2
-1

When you run from CLI, are you typing the command in the file or ./StopApache.sh? It could be that your permissions are wrong on the file.

chmod u+x StopApache.sh

should give your file execute permission for the owner.

This is a desktop icon problem, quite appropriate here, IMHO. The same sort of issue can occur in any multi-user OS.

-1

package you can type in
internet ie trap17
or if ie is default you can type in internet trap17.com
and if .com is default and you turned on short cmds then you can type in
i trap17 (or the bookmark name such as "i t17"

Yet another thing
For firefox you put
@start /b "firefox.exe" %*

For internet exlorer you only need to put in
@start /b "iexplore.exe" %*

There is a lot more that i can say but i don't have the time to put it all here
SNIP

Edited by happygeek: fake sig snipped

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.