Ave,
Mac OS X (10.3.9)
I've written an AppleScript that does two things:
Restart the Apache Web Server
Mount an SMB share on a pre-defined share point.
My script is performing the second function fine, but restarting the Apache Web Server is giving a problem. Here's my script:
The problem is, I have SSL enabled on my Apache Server, thus when i issue the following command, "sudo apachectl restart", First it asks for the root password, which my script tells the shell, then it asks for the ssl passphrase. At this point my script terminates and does not start the Apache Web Server because it doesn't know the second password.
How can i give my script the second password to use for the SSL Passphrase?
Thanks.
Mac OS X (10.3.9)
I've written an AppleScript that does two things:
Restart the Apache Web Server
Mount an SMB share on a pre-defined share point.
My script is performing the second function fine, but restarting the Apache Web Server is giving a problem. Here's my script:
Code:
tell application "Finder"
try
do shell script "sudo apachectl restart" password "password" with administrator privileges
on error
-- do nothing
end try
try
do shell script "mount -t smbfs //usrname@192.168.1.2/Transfer ~/Documents/XFER/osm"
on error
-- do nothing
end try
display dialog "Server Started, Connections Established"
end tell
The problem is, I have SSL enabled on my Apache Server, thus when i issue the following command, "sudo apachectl restart", First it asks for the root password, which my script tells the shell, then it asks for the ssl passphrase. At this point my script terminates and does not start the Apache Web Server because it doesn't know the second password.
How can i give my script the second password to use for the SSL Passphrase?
Thanks.