可以实现,先按照这个贴子里面做到第三步
使用以下命令看是否挂载成功挂载,oss是你自己设置的配置文件名称,/vol1/1000/t需要替换成你自己的目录地址
rclone mount oss: /vol1/1000/t --daemon --allow-other --vfs-cache-mode writes
然后添加开机启动脚本内容
nano /etc/systemd/system/oss.service
添加:
[Unit]
Description=haorclone Service
After=network.target[Service]
Type=simple
ExecStartPre=-/bin/sleep 30
ExecStart=rclone mount oss: /vol1/1000/t --allow-other --vfs-cache-mode writes[Install]
WantedBy=default.target
- 验证并让开机脚本生效
更新systemd目录
systemctl daemon-reload
创建开机快捷方式
systemctl enable oss.service
启动服务
systemctl start oss.service
查看服务状态
systemctl status oss.service
重启一下飞牛,看能正常启动不