以rclone为例

  • 创建文件 vi etc/init.d/rclone.sh
#! /bin/sh
export RCLONE_DRIVE_ACKNOWLEDGE_ABUSE=true
rclone mount GoogleDrive:/  /root/fileServer/GoogleDrive --allow-other --allow-non-empty --vfs-cache-mode writes &
/root/fileServer/server -path /root/fileServer &
  • /etc/rc5.d/ 中创建软连接
cd /etc/rc5.d/ && ln -s ../init.d/rclone.sh  S10rclone.sh
  • reboot 重启