Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to run an IRC bot as a daemon using daemon (also tried with the daemonize utility),

I use the following command to run it,

daemon --name=HsIRCb --chdir=/var/lib/jenkins/jobs/HsIRCb/workspace --command=/var/lib/jenkins/jobs/HsIRCb/workspace/dist/build/HsIRCb/HsIRCb --pidfile=/var/lib/jenkins/jobs/HsIRCb/workspace/

When I run the command as root, it works and the bot connects and stays there like it's supposed to, but when I ask jenkins to run it, it connects and quits immediately.

I've also tried to log in as the jenkins user, and still no dice (doesn't throw any errors).

It's worth noting that on normal users it works, it's only a problem with the user created by jenkins.

So, I'm wondering, is there some permissions that the jenkins user doesn't have, or should it be in some group or something?

share|improve this question

Did you try screen instead of daemon / daemonize? It is generally more featureful and tolerant of things like manipulating the shell, etc.


screen -mdS HsIRCb /path/to/command

There are ways for you to do things like changing directory, logging in as a different user, etc. but this is the basic idea.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .