Mounting the cloud at boot

Where I just did not shove it both in the script and in the crowns, it does not start. Only handles in the terminal.
How to make, for example, fstab make friends with webdav (wdfs). I wanted to somehow automate the process of mounting the cloud at boot time.

The first option in fstab itself:
Code:
https://webdav.yandex.ru/ /usr/home/user/yadisk/ fuse rw,noatime,noauto,username=***,password=***, accept_sslcert,allow_other,mountprog=/usr/local/bin/wdfs 0 0


The second option (via script):
Create a script to mount when the server boots.

# ee /usr/local/bin/yadisk.sh


Code:
The contents of the script:
#!/bin/sh
PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin"
export PATH
/usr/local/bin/wdfs https://webdav.yandex.ru /usr/home/user/yadisk/ -o username=user@yandex.ru,password=pAssW0rd,allow_other

Add the script in crowns

Code:
# crontab -e
@reboot /usr/local/bin/yadisk.sh

The third option in manual mode, everything is mounted without problems:

Code:
#su user -c "wdfs https://webdav.yandex.ru/ /usr/home/user/yadisk/ -u 56456983514251309 -p zcRdUGs345rty4er6zpcN3Z"


FreeBSD A9t 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC i386
 
Back
Top