Closed BClark09 closed 7 years ago
Hi @BClark09,
you will need different init scripts for deb and rpm. Again elasticsearch does it like this:
systemd rpm and deb: https://github.com/elastic/elasticsearch/blob/master/distribution/src/main/packaging/systemd/elasticsearch.service
Finding the right script is a bit more complicated: https://github.com/elastic/elasticsearch/blob/master/distribution/build.gradle#L292
May be it could be solved more easily by:
ospackage {
...
}
buildDeb {
...
into('/etc/initi.d') {
from 'src/dist/deb/init.d/$initScript
}
}
buildRpm {
into('/etc/initi.d') {
from 'src/dist/rpm/init.d/$initScript
}
}
Thanks @theoweiss, that's really helpful. I will try to get round making an init script for the rpm side when I can, but for now wanted to get at least systemd scripts working.
Deb and RPM init daemons are simply incompatible. We should only allow RPM systemd processes until we can make a separate init script for RHEL systems.
Additionally, this PR defines some simple placeholders for the special OSes that can use dpkg but don't have the same daemon logging functions.
Signed-off-by: Ben Clark ben@benjyc.uk