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

#!/bin/sh
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 $?
 else
  /etc/init.d/sec start || exit $?
 fi
fi
# End automatically added section

while the jsontrap package DEBIAN/postinst contains

#!/bin/sh
set -e
# Automatically added by dh_pysupport
if which update-python-modules >/dev/null 2>&1; then
 update-python-modules jsontrap.public
fi
# 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

Language:
English Edit question
Status:
Solved
For:
Quickly Edit question
Assignee:
No assignee Edit question
Solved by:
Tony Byrne
Solved:
2011-10-23
Last query:
2011-10-23
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