向日葵11.0.1,之前机械硬盘安装使用没有问题。更换固态硬盘后,每次开机或重启都要等比较久才能在手机上看到显示在线。
百思不得其解,开机后手动打开向日葵一看。左下角显示服务器连接失败。猜测原因可能是固态开机太快了。当向日葵启动的时候,网络还没有连接上,所以向日葵第一次连接就会失败。直到重连后才成功上线。
那么打开/etc/systemd/system/runsunloginclient.service看下。
[Unit]
Description=check running sunloginclinet loop
[Service]
Type=simple
ExecStart=-/usr/local/sunlogin/bin/oray_rundaemon -m server
ExecStop=
[Install]
WantedBy=multi-user.target
嗯哼,一个基于网络的服务,居然不等网络就启动了。
所以在[Unit]项下增加一行After=network-online.target,让向日葵服务等待网络后再启动。
修改后的service如下:
[Unit]
Description=check running sunloginclinet loop
After=network-online.target
[Service]
Type=simple
ExecStart=-/usr/local/sunlogin/bin/oray_rundaemon -m server
ExecStop=
[Install]
WantedBy=multi-user.target
重启试试。问题解决。开机后向日葵直接上线。不用再等了。