How to install a daemon with quickly

Asked by Tony Byrne on 2011-10-16

I'm building a project jsontrap that runs as a daemon.
I can get my daemon working but I'm having difficulty building a deb package for it.
I have an init command (/etc/init.d/jsontrap) that can start and stop the daemon. But when I look at a similar daemon package (sec_2.5.3-1+nmu1_all.deb) it includes links in /etc/rcd1.d, for example, that point at /etc/init.s/sec.

the sec package DEBIAN/postinst contains this

set -e
# Automatically added by dh_installinit
if [ -x "/etc/init.d/sec" ]; then
 update-rc.d sec defaults >/dev/null
 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
  invoke-rc.d sec start || exit $?
  /etc/init.d/sec start || exit $?
# End automatically added section

while the jsontrap package DEBIAN/postinst contains

set -e
# Automatically added by dh_pysupport
if which update-python-modules >/dev/null 2>&1; then
 update-python-modules jsontrap.public
# End automatically added section

I guess I need quickly package to call dh_installinit for my project. Does anyone know how to achieve this ?

Question information

English Edit question
Quickly Edit question
No assignee Edit question
Solved by:
Tony Byrne
Last query:
Last reply:
Tony Byrne (tony-badwolf) said : #1

Found the solution.
I had been creating the daemon control files like this
quickly create ubuntu-cli jsontrap
mkdir jsontrap/etc
mkdir jsontrap/etc/init.d
cp /etc/init.d/skeleton jsontrap/etc/init.d/jsontrap

what I should have done was

quickly create ubuntu-cli jsontrap
mkdir jsontrap/debian
cp /etc/init.d/skeleton jsontrap/debian/jsontrap.init