-
Notifications
You must be signed in to change notification settings - Fork 50
systemd example #92
Comments
You'd use depends = "$auto, systemd, openssl, someother-dev" we have systemd example here: https://github.com/mmstick/cargo-deb#example-of-custom-cargotoml-additions |
@kornelski Hello, thanks that basically works, I just get some warning like this:
do you know how to remove them? |
and also I specified already the
Any way there is no error and it works perfeclty, hope you can let me know what's the cause for this type of warning. |
The systemd example only seems to be a dependency on systemd, not an example of making your application manageable as a systemd unit. I'm looking at this right now and you seem to need a unit file asset and a postinst maintainer-script (the latter if you want the unit enabled or maybe even started). In the simplest case something like this in Cargo.toml:
(assuming you had a debian/assets subdirectory in your project) To enable/start the unit post install you'd then also need in Cargo.toml:
And a
Unfortunately the unit file content is dependent on which systemd version the target O/S supports, e.g. Ubuntu 16.04 and Ubuntu 18.04 don't support What I haven't worked out is how to use cargo deb to build packages for different O/S target versions, the only way I can currently imagine is to use additional Cargo.toml files which will be a lot of copy/pasting to maintain! FYI I looked for inspiration at the Hmm, I suppose the assets could include multiple systemd unit files and the Updarte: One could also use a single Cargo.toml file by having file |
So I just came across #100 which relates to this. Additionally I just discovered |
Hello, I would like to use
cargo-deb
to replace mybash
script. I needopenssl
and someotherdev
packages as dependencies.At the same time, I would like to be able to manage my application using systemd (status, stop, start...).
I also have
Config.toml
which should be put together with the binary.Could you please give me some information on how to achieve this using
cargo-deb
? thanks!The text was updated successfully, but these errors were encountered: