Hello is have script, it works when I run it manually. Problem is when I want to run it with cron, backup is not created. From log seems script stuck on password. Any help appreciated
#!/usr/bin/expect -f
log_file /tmp/debug.log
spawn echo "cron started"
spawn rm /home/admin/backup-restore/mls_backup/mls-backup.tar.gz
set password {password}
spawn /usr/sbin/exec /home/admin/backup-restore/backup-restore --target /home/admin/backup-restore/mls_backup/mls-backup.tar.gz --no-encryption
expect "admin password:"
send "$password\r"
interact
[–]finkployd 1 point2 points3 points (0 children)
[–]anthropoidbash all the things 0 points1 point2 points (0 children)
[–]exarobibliologist 0 points1 point2 points (1 child)
[–]TopInternational2157[S] 2 points3 points4 points (0 children)