Answer the question
In order to leave comments, you need to log in
How to mount disk via cron?
There is a file /usr/bin/test.sh with launch rights, the text is something like this:
#!/bin/bash
WIN_MOUNT=/mnt/backup
WIN_SHARE=//192.168.5.15/backup
WIN_USER=WinUser
WIN_PASS=MyPassword
BACKUP_DIR=$WIN_MOUNT/backup-sites
mkdir -p $WIN_MOUNT
mount.cifs $WIN_SHARE $WIN_MOUNT -o user=$WIN_USER,password=$WIN_PASS
копирую файлы
umount $WIN_MOUNT
Answer the question
In order to leave comments, you need to log in
I registered the line in crontab:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin it
worked
although I copied it from the console:
echo $PATH
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question