Archlinux systemd开机自动挂载alioss

vim /etc/systemd/system/mountoss.service

[Unit]
Description=mount oss on boot
Requires=network-online.target
After=network-online.target firewalld.service
Before=After=docker.socket
[Service]
Type=oneshot
RemainAfterExit=yes

# 写自己的信息
ExecStart=/usr/local/bin/ossfs my-bucket /tmp/ossfs -ourl= /data/public/syncthing -ourl=oss-cn-beijing.aliyuncs.com -o allow_other

[Install]
WantedBy=multi-user.target

systemctl enable mountoss.service

Show Comments