TERM environment variable not set

前端 未结 4 396
花落未央
花落未央 2020-12-01 05:14

I have a file.sh with this, when run show : TERM environment variable not set.

smbmount //172.16.44.9/APPS/Interfas/HERRAM/sc5 /mnt/siscont5 -o 
iocharset=ut         


        
4条回答
  •  感动是毒
    2020-12-01 05:35

    SOLVED: On Debian 10 by adding "EXPORT TERM=xterm" on the Script executed by CRONTAB (root) but executed as www-data.

    $ crontab -e

    */15 * * * * /bin/su - www-data -s /bin/bash -c '/usr/local/bin/todos.sh'
    

    FILE=/usr/local/bin/todos.sh

    #!/bin/bash -p
    export TERM=xterm && cd /var/www/dokuwiki/data/pages && clear && grep -r -h '|(TO-DO)' > /var/www/todos.txt && chmod 664 /var/www/todos.txt && chown www-data:www-data /var/www/todos.txt
    

提交回复
热议问题