NextCloud挂载Google Drive后实现开机自动挂载命令

559 浏览nextcloud
0

NextCloud挂载Google Drive后,我们还需要实现开机自动挂载,以下命令适用于适用于CentOS 7Debian 8+Ubuntu 16+

cat > /etc/systemd/system/rclone.service <<EOF
[Unit]
Description=Rclone
After=network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/rclone mount nextxxx:cloudbackxxx /xxxnext \
 --umask 0000 \
 --default-permissions \
 --allow-non-empty \
 --allow-other \
 --transfers 4 \
 --buffer-size 32M \
 --low-level-retries 200 \
 --dir-cache-time 6h \
 --vfs-read-chunk-size 64M \
 --vfs-read-chunk-size-limit 1G \
 --vfs-cache-mode writes
Restart=on-abort
User=root

[Install]
WantedBy=default.target
EOF

请把ExecStart后面的挂载换成你自己的。

开始启动:

systemctl start rclone

设置开机自启:

systemctl enable rclone

其他命令:

重启:systemctl restart rclone
停止:systemctl stop rclone
状态:systemctl status rclone

分享到:
更改状态以发布

Login

Welcome! Login in to your account

Remember meLost your password?

Don't have account. Register

Lost Password

Register