3

I have installed and configured trac and it runs fine using the standalone tracd command. The problem is this: when I exit the terminal it suddenly terminates. I have tried:

  • CTRL+Z, bg: now tracd runs but does not respond after I exit the terminal. the process is still there.
  • I have tried setsid tracd .... Same thing, the process runs but no response from the server after closing the terminal

Do you have any experience with tracd?

I know I can solve the problem by setting up trac the canonical way using apache, I just don't want to. Using tracd would be perfectly fine for me. So please don't give me alternative solutions.

noname
  • 115
  • 2
  • 6

2 Answers2

7

Here's the script I use to start tracd

#!/bin/sh

# ./startTrac.sh
/usr/bin/python /usr/bin/tracd \
  --auth *,/web/trac/trac.htdigest,Trac \
  --env-parent-dir /web/trac/htdocs \
  -d --port 81

It's the -d on the last line that sets it to run as a 'daemon', and put itself into the background. This won't start it running after the machine has restarted, but this is just from a home server that only I'm using, and it's only been restarted a few times in the last year anyway.

The --auth * refers to a number of Trac installations in the same directory as the script BTW. A little index.php, also in the same directory (here, /web/trac/htdocs/), just dumps a list out with links to http://URL/subdirname/

Alister Bulman
  • 1,624
  • 13
  • 13
5

run tracd either in screen, or run

nohup tracd&

And it'll continue to run after you close the terminal.

In the long run, you'll probably want to add it to your init scripts or something however.

Cian
  • 5,777
  • 1
  • 27
  • 40