Auto login PTT with Expect

Required Tools

sudo apt-get install expect

Step

  1. Get ptt.sh

    sudo wget https://raw.github.com/carry0987/Raspberry-Pi-Repo/master/Expect/ptt.sh
    
  2. Set username & password

    vim ptt.sh
    
  3. Give the script executing permission

     sudo chmod +x ptt.sh
    
  4. Move ptt.sh to usr folder

     sudo mv ptt.sh /usr/local/bin
    
  5. Now edit crontab to make the script run every minutes

     sudo vim /etc/crontab
    
  6. Add the following script on the bottom, then save and exit

     * 6 * * * root /usr/bin/expect /usr/local/bin/ptt.sh >/dev/null 2>&1
    
  7. Restart cron service

     sudo service cron restart
    
  8. Finish

Copyright © carry0987 all right reserved,powered by GitbookLast Modified : 2024-04-08 11:07:13

results matching ""

    No results matching ""