kornelski / cargo-deb

Make Debian packages directly from Rust/Cargo projects
https://lib.rs/cargo-deb
MIT License
408 stars 48 forks source link

Running "update-rc.d defaults", "update-rc.d enable" and "service xxx start" on install? #76

Closed fadedbee closed 1 year ago

fadedbee commented 1 year ago

Thanks for writing cargo-deb, my daemon packages already work with systemd-based OSs, such as Ubuntu and Debian.

I currently have /etc/init.d/xxx as a resource, and it is correctly installed with dpkg -i.

For sysv-init OSs, such as Devuan, I have to manually run update-rc.d defaults, update-rc.d enable and service xxx start after installing the package.

Does cargo-deb have any sysv-init support?

How can I automate these commands?

ximon18 commented 1 year ago

Hi @fadedbee,

You can use the maintainer-scripts setting mentioned in the README for this.

Ximon