상태에 텍스트가 있으면 systemd를 다시 시작하시겠습니까?

상태에 텍스트가 있으면 systemd를 다시 시작하시겠습니까?

특정 상태 텍스트에 의해 트리거되는 시스템 서비스[0]를 다시 시작하는 방법(예:403

[1]에 대해 내가 이해한 바는 Restart=on-failure그것이 나의 특정 목적에 사용될 수 없다는 것을 의미합니다.

root@raspberrypi:~# systemctl status raspotify

lines 1--1...skipping...
● raspotify.service - Raspotify
   Loaded: loaded (/lib/systemd/system/raspotify.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2020-12-11 14:35:19 CET; 18h ago
  Process: 2531 ExecStartPre=/bin/mkdir -m 0755 -p /var/cache/raspotify (code=exited, status=0/SUCCESS)
  Process: 2532 ExecStartPre=/bin/chown raspotify:raspotify /var/cache/raspotify (code=exited, status=0/SUCCESS)
 Main PID: 2533 (librespot)
    Tasks: 2 (limit: 1635)
   CGroup: /system.slice/raspotify.service
           └─2533 /usr/bin/librespot --name raspotify (raspberrypi) --backend alsa --bitrate 160 --disable-audio-cache --enable-volume-normalisation --linear-volume --initial-volume=100 --username foo --passwo

Dec 11 14:35:19 raspberrypi systemd[1]: Starting Raspotify...
Dec 11 14:35:19 raspberrypi systemd[1]: Started Raspotify.
Dec 11 14:35:19 raspberrypi librespot[2533]: [2020-12-11T13:35:19Z INFO  librespot] librespot (raspotify v0.14.0) 6aac8a6 (2020-07-24). Built on 2020-07-26. Build ID: wPNyqn0m
Dec 11 14:35:29 raspberrypi librespot[2533]: [2020-12-11T13:35:29Z WARN  librespot_core::apresolve] Failed to resolve Access Point: HTTP error
Dec 11 14:35:29 raspberrypi librespot[2533]: [2020-12-11T13:35:29Z WARN  librespot_core::apresolve] Using fallback "ap.spotify.com:443"
Dec 11 14:35:29 raspberrypi librespot[2533]: [2020-12-11T13:35:29Z INFO  librespot_core::session] Connecting to AP "ap.spotify.com:443"
Dec 11 14:35:39 raspberrypi librespot[2533]: [2020-12-11T13:35:39Z ERROR librespot] Could not connect to server: failed to lookup address information: Temporary failure in name resolution

이제는 수동으로

root@raspberrypi:~# systemctl restart raspotify

모든 것이 정상으로 돌아왔습니다

[0]https://github.com/dtcooper/raspotify

[1]https://www.freedesktop.org/software/systemd/man/systemd.service.html#Restart=

관련 정보