Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions container/debian/cuttlefish-podcvd.cuttlefish-podcvd.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[Unit]
SourcePath=/etc/init.d/cuttlefish-podcvd
Description=Setup initial environment to use podcvd
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QQ: why do we need systemd service for 'initial' env setup? can't it be done in postinstall script in deb pkg?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of network interface(named podcvd) configuration for linking and routing. It wasn't even triggered during post-installation, when SysV init is not compatible on the machine.

After=network-online.target
After=remote-fs.target
Wants=network-online.target

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
SuccessExitStatus=5 6
ExecStart=/etc/init.d/cuttlefish-podcvd start
ExecStop=/etc/init.d/cuttlefish-podcvd stop

[Install]
WantedBy=multi-user.target
2 changes: 2 additions & 0 deletions container/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ override_dh_installinit:
.PHONY: override_dh_installsystemd
override_dh_installsystemd:
dh_installsystemd --name=podcvd-acl-restore
dh_installsystemd --name=cuttlefish-podcvd
dh_installsystemd

.PHONY: override_dh_auto_clean
override_dh_auto_clean:
Expand Down
Loading