-
Notifications
You must be signed in to change notification settings - Fork 50
Packaging a service #100
Comments
You can. You will need to add |
Yeah, I have added it to assets and i can see that it gets into the package, however, I think that when creating deb packages otherwise, they do some automagic that enables services automatically somehow. When I add the service unit file with the But some other threads I found highlighted some problems in doing stuff like this using postinst, etc that depended on systemctl. So before I started jumping down this rabbit-hole, i was thinking I could ask here. This issue describes what I want. From this one, I tried to adding the If i have to start creating postinst and preinst scripts, an example would be very helpful so that I could know what to expect. |
There's nothing magic in deb for services. The services are "automatically" enabled by putting |
So if i wanted to enable on installation it I would have to use the postinst scripts, gotcha |
No? I think mere existence of a .service file in |
Yeah, I tried that. It is recognized by systemd so that I can run |
Hi! I usually do that using the Here are the files I use (click to expand) :
|
I didn't need to do anything extra when packaging something with |
When packaging using Debian packaging tools such as debhelper the dh_installsystemd command can be used to cause systemd unit activation related autoscript fragments to be inserted into maintainer scripts in place of the |
Please test the latest beta. https://github.com/mmstick/cargo-deb/blob/master/systemd.md |
I want to package a binary that is being used as a service. I have my package.service located in the project folder under scripts/package.service.
Is there any example of how I would go about in cargo deb to get the software service file included, installed and enabled?
The text was updated successfully, but these errors were encountered: