I am trying to package a cron as part of my debian package (https://github.com/indykish/megam_akka.git).
The debian package is built using the sbt-native-packager. I placed the cron script inside my bin directory as here https://github.com/indykish/megam_akka/blob/master/bin/megamherk.cron.d
I changed my build.sbt to pickup the megamher.cron.d as here https://github.com/indykish/megam_akka/blob/master/build.sbt
I have attached the snippet of code here:
linuxPackageMappings in Debian <+= (baseDirectory) map { bd =>
(packageMapping((bd / "bin/herk_stash") -> "/usr/share/megamherk/bin/herk_stash")
withUser "root" withGroup "root" withPerms "0755")
}
linuxPackageMappings in Debian <+= (baseDirectory) map { bd =>
(packageMapping((bd / "bin/megamherk.cron.d") -> "/etc/cron.d/megamherk")
withUser "root" withGroup "root" withPerms "0755")
}
I ran:
sbt clean compile
sbt dist:dist
sbt debian:packageBin
The generated debian bundle inside the target directory doesn't have the cron bundled.
I referred this debian documentation (http://www.debian.org/doc/manuals/maint-guide/dother.en.html#crond)
Am I missing something here ? How do I make sbt-native-package pickup a cron job ?