Portable service and bind paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I am experimenting with a portable service for Home Assistant. I think
embedding it as a portable service would be a good way to isolate its
quite extensive dependencies.

But I would like to bind mount a directory on the host into the
service and I can't figure it out.
The portable service file looks like below but the bind path does not
seem to take effect.

Is this maybe the wrong way to go? I am able to bind mount it if I
start using a regular service, that calls systemd-nspawn (like
ExecStart=/usr/bin/systemd-nspawn -M homeassistant /srv/homeassistant/bin/hass
) and has a corresponding .nspawn file with Bind attribute.

I also read in the documentation that .nspawn files are not among the
unit fies copied out from the image. What is the recommended way to go
about with this for a portable service?

best regards,
Claes


[Unit]
Description=Home Assistant (portable service)
After=network-online.target

[Service]
Type=simple
ExecStart=/srv/homeassistant/bin/hass
Restart=on-failure
RestartSec=5s
BindPaths=/home/claes/projects/homeassistant/configuration-.homeassistant:/home/homeassistant/.homeassistant

[Install]
WantedBy=multi-user.target

-- 
C l a e s    H o l m e r s o n
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux