mirror of
https://github.com/tonarino/innernet.git
synced 2025-02-01 13:18:02 +02:00
1b260823f9
Surprisingly, Restart=always may not _always_ restart the unit if it restarts too fast. Set a combination of options which should make systemd truly restart innernet always. See https://unix.stackexchange.com/q/289629/352972. The `RestartSec=60` is the main and important one which would prevent systemd from ever failing to restart innernet in the default settings (because with it it would never exceed the default limit of 5 restarts in 10 seconds). `StartLimitIntervalSec=0` option is a complementary one for explicitly disabling the logic, and may be removed from this PR if deemed unnecessary.
18 lines
563 B
Desktop File
18 lines
563 B
Desktop File
[Unit]
|
|
Description=innernet client daemon for %I
|
|
After=network-online.target nss-lookup.target
|
|
Wants=network-online.target nss-lookup.target
|
|
PartOf=innernet.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
ExecStart=/usr/bin/innernet up %i --daemon --interval 60
|
|
Restart=always
|
|
# When the daemon exits, wait this amount of secs before restarting. Used to prevent StartLimitBurst
|
|
# (5 by default) restarts happening within StartLimitIntervalSec (10 by default) after which systemd
|
|
# would refrain from restarting innernet anymore.
|
|
RestartSec=10
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|