szmoore / MCTX3420

2013 MCTX3420 UWA Team 4
7 stars 7 forks source link

Daemonising the server, a start/stop script, and server arguments/configs #39

Open szmoore opened 11 years ago

szmoore commented 11 years ago

Eventually we should move to using /etc/init.d scripts to start/stop the server. The server will also require some arguments, some of which can be passed through or set by the script.

For example, the path to ADC files isn't always the same. It makes more sense to determine things like that in the start/stop script where horrible hacks are standard practice, instead of the C program (which would involve either a system call or implementing a file system search). Then pass them as arguments or in a config file.

Currently run.sh serves as a start script but we don't have a stop script.

szmoore commented 11 years ago

Path to ADC files is now constant, but there are still significant benefits to implementing init.d style scripts and allowing the server to run as a daemon.

Most notably, you wouldn't have to manually start the software, which would make the hardware people (who have to wait an extra minute after spending two hours plugging things in) happy. It would also let people test the system without someone who knows how to start the software having to be present.

szmoore commented 11 years ago

Note that currently the arguments to the server are stored in the "parameters" file which is parsed by run.sh