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

Re: restarting instanced systemd services on upgrade



Hi Simon,

once again, thanks a lot. I have now tried out your suggestion and it
works nicely. Just to make sure, I have now the following units, see
below. I am aware that the system instantiation service onedrive@ is not
optimal since it expects $HOME to be /home/%i, but let us leave this
aside for now. I will document other options like lingering etc.

Please let me know any comments/improvements for the units you might
see.

Thanks again and best regards

Norbert


/lib/systemd/system/onedrive.target
-----------------------------------
[Unit]
Description=OneDrive Master
Before=multi-user.target

[Install]
WantedBy=multi-user.target


/lib/systemd/system/onedrive@.service
--------------------------------------
[Unit]
Description=OneDrive Free Client for %i
Documentation=https://github.com/abraunegg/onedrive
After=network-online.target
Wants=network-online.target
PartOf=onedrive.target

[Service]
ExecStart=/usr/bin/onedrive --monitor --confdir=/home/%i/.config/onedrive
User=%i
Group=users
Restart=on-failure
RestartSec=3
RestartPreventExitStatus=3

[Install]
WantedBy=multi-user.target



/usr/lib/systemd/user/onedrive.service
--------------------------------------
[Unit]
Description=OneDrive Free Client
Documentation=https://github.com/abraunegg/onedrive
After=network-online.target
Wants=network-online.target
PartOf=onedrive.target

[Service]
ExecStart=/usr/bin/onedrive --monitor
Restart=on-failure
RestartSec=3
RestartPreventExitStatus=3

[Install]
WantedBy=default.target


--
PREINING Norbert                              https://www.preining.info
Accelia Inc. + IFMGA ProGuide + TU Wien + JAIST + TeX Live + Debian Dev
GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13


Reply to: