再起動=常ににもかかわらず、システムサービスがエラーで再起動されない

再起動=常ににもかかわらず、システムサービスがエラーで再起動されない

エラーを確認して使用してください。journalctl -u raspotify --since=yesterday | grep ERROR

Dec 26 22:50:11 raspberrypi librespot[3024]: [2020-12-26T21:50:11Z ERROR librespot] Could not connect to server: failed to lookup address information: Temporary failure in name resolution

以下を使用して手動で再起動します。systemctl restart raspotify

エラーが発生したときにサービスを自動的に再起動するには、サービスで何を変更する必要がありますか?

cat /lib/systemd/system/raspotify.service:

[Unit]
Description=Raspotify
After=network.target

[Service]
User=raspotify
Group=raspotify
Restart=always
RestartSec=10
PermissionsStartOnly=true
ExecStartPre=/bin/mkdir -m 0755 -p /var/cache/raspotify ; /bin/chown raspotify:raspotify /var/cache/raspotify
Environment="DEVICE_NAME=raspotify (%H)"
Environment="BITRATE=160"
Environment="CACHE_ARGS=--disable-audio-cache"
Environment="VOLUME_ARGS=--enable-volume-normalisation --linear-volume --initial-volume=100"
Environment="BACKEND_ARGS=--backend alsa"
EnvironmentFile=-/etc/default/raspotify
ExecStart=/usr/bin/librespot --name ${DEVICE_NAME} $BACKEND_ARGS --bitrate ${BITRATE} $CACHE_ARGS $VOLUME_ARGS $OPTIONS

[Install]
WantedBy=multi-user.target

ACTION=="add", SUBSYSTEM=="net", KERNEL=="wl*", RUN+="/usr/bin/iw dev $name set power_save off"

ベストアンサー1

おすすめ記事