Re: Need help packaging OpenTibia Server
On Fri, 20 Mar 2009 15:00:58 +0100 Ivan Vučica wrote:
> Can someone take a look at this summary, and comment if I got it right,
> suggest changes etc?
>
> http://opentibia.svn.sourceforge.net/viewvc/opentibia/otserv/trunk/debian-packaging-plan.txt
For the people reading without net-access, here are the contents of
that file, incl my comments
> * daemonize
> - server should fork off right away after startup
> - server should write its pidfile somewhere in /var to allow detection and
> killing of running server
> - server should implement a command line option "-k" which will find
> server's pid and kill the process
> - functionality easy to implement using debian's libdaemon (google it up!)
Great, -k is not needed, but wont hurt for sure
> * add init.d
> - use /etc/init.d/skeleton as basis for an init.d script
> - use dh_installinit to install the symlinks to the script into proper
> places in rcX.d
correct too.
> * when installing create 'otserv' user and make init.d script setuid 'otserv'
> - should be done in preinst script
> - check out /var/lib/dpkg/info/mysql-server-5.0.preinst
> - don't forget to remove the user upon uninstallation of the program
setuid wont work on scripts. better use su or start-stop-servers
--chuid or --user ;)
Rest fine.
> * optional: database configuration using debconf
> - many debian packages (e.g. roundcube) use debconf scripts for prompting
> user to input configuration data through a gui
> - using this allows both terminal users and gui users to get configuration
> ui in their environment-specific "friendly" manner
> - roundcube mentions db-config, someone should study this -- help and
> suggestions welcome
correct, but I never used it so cant comment
Reply to: