How to run shell script from daemon in Ubuntu?
Hi,
I Installed java application as daemon using Apache Daemon(Jsvc).
Now I want to install [.deb] package from daemon for that I used following way.
1. From Java application(daemon) I use the following code to run shell script file
String[] s = {"/home/
Process p = Runtime.
2. In RunShell1.sh I write the following text to install package
#!/bin/sh
### BEGIN INIT INFO
installit() {
echo "installing Java-package1.0 ..."
eval "dpkg -i Java-Package-
}
uninstallit() {
echo "uninstalling ava-package1.0 ..."
eval "sudo dpkg -r Java-Package-1.0"
}
and other stuff to execute the installation process.
When I run the above shell script file from the Normal Java Application it works fine(installation success).
but similar script I run from the Daemon then it not working (Installation failure).
I don't know what is going wrong when I try same code from daemon.
If any one have any Idea regarding this please reply to post ASAP
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Ubuntu apache2 Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: