4
Before running a R script on server 'A' I have to restart Shiny-server on server 'B'.
/bin/ssh cabala@***.***.***.*** 'sudo service shiny-server restart'
I would like to enter a command into the R script on the 'A' server system()
that left Shiny-server on the 'B' server. You would still have the problem of sending sudo password in this command.
Need to be automatic password entry? If yes, you can look at the argument
-a
ofsudo (man sudo)
. If you want to enter the password when running the script this can help :system('sudo -kS service shiny-server restart', input = readline("Enter your password: "))
– Willian Vieira
Yes, it is an internal routine and would have no problem automating the password entry.
– Márcio Mocellin