systemctl开机自启rclone挂载

环境:已安装配置好onedrive挂载,设置开机自启
以onedrive为例(其他也差不多)
不能使用systemctl的请先在root下安装

apt install systemd-sysv && reboot

1、进入你的systemd目录,然后创建文件rclone.service
2、

vi rclone.service

3、粘贴,ExecStart替换下

[Unit]
Description=rclone
[Service]
User=root
ExecStart=rclone mount od:/ /root/onedrive --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000
Restart=on-abort
[Install]
WantedBy=multi-user.target

4、键盘操作点击esc,再输入

:wq

5、如果出现问题,一般都是文件路径的事情,请自行解决。
6、命令
开机自启:

systemctl enable rclone

启动:

systemctl start rclone

重启:

systemctl restart rclone

停止:

systemctl stop rclone

状态:

systemctl status rclone

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章