Linux - shutdown-script with SSH -
i make shutdown-script raspberry pi shut down anothe raspberry pi on ssh.
the script works if running @ shutdown routine ssh command not executed.
so have done until now:
- made script in /etc/init.d:
#!/bin/sh # first thing test if shutdown script working echo "bla bla bla " | sudo tee -a /test.txt ssh pi@10.0.0.98 sudo shutdown -h
- made executable
sudo chmod +x /etc/init.d/raspi.sh
- made symlink rc0.d
sudo ln -s /etc/init.d/raspi.sh /etc/rc0.d/s01raspi.sh
now know far shutdown script working outside of shutdown routing calling , shutdown symlink made working partially because see changes in test.txt file every time shut down.
can me how solve problem?
have tried single quotes? first link in google has it
http://malcontentcomics.com/systemsboy/2006/07/send-remote-commands-via-ssh.html
what sudo, how solve entering password?
https://superuser.com/questions/117870/ssh-execute-sudo-command
please check or other links on web have useful information.
i have send in comment cant yet because of reputation.
Comments
Post a Comment