have R halt the EC2 machine it's running on

后端 未结 4 2146
深忆病人
深忆病人 2021-02-09 01:50

I have a few work flows where I would like R to halt the Linux machine it\'s running on after completion of a script. I can think of two similar ways to do this:

  1. r
4条回答
  •  没有蜡笔的小新
    2021-02-09 02:17

    system("echo 'rootpassword' | sudo halt")
    

    However, the downside is having your root password in plain text in the script.

提交回复
热议问题