You are not logged in.
Hi,
I'm trying to run hg serve in rc.local but for some reason the server doesn't seem to start.
Besides comments, my rc.local contains this:
echo conservative >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 55 >/sys/devices/system/cpu/cpu0/cpufreq/conservative/down_threshold
hg serve --daemon --port 5000 --prefix /mnt/data/Dev/Projets/Robot/
After booting, hg is not running. But If I copy-paste the hg serve line into a terminal, that works.
I can't find any related error message in dmesg or /var/log/messages.log, but I'm not sure if they are the good places to look.
/mnt/data is an NTFS partition that is declared in fstab and mounted at boot. This is supposed to happen before rc.local is run...
Also I tried running the server as root and that works, so that's not the problem (even though I might want to run it as another user).
Any idea why hg doesn't start when run in rc.local?
Last edited by stqn (2010-04-29 22:15:14)
Offline
You can try to debug it by appending ">/some/file" and/or "2>/some/file2", and its stdout and stderr outputs will be stored there.
Offline
Thanks, I hadn't thought about that. Here is the error message I got:
"abort: There is no Mercurial repository here (.hg not found)!"
I tried a lot of things, googled and rebooted way too many times before I understood my error: "hg serve" has to be run from within the repository directory!
This works:
cd /mnt/data/Dev/Projets/Robot/ && hg serve --daemon --port 5000 --prefix /mnt/data/Dev/Projets/Robot/
And I lost so much time looking for mount and permissions problems... :-\
Thanks for your help!
Offline