There is a way to Restart/Shutdown the server from AdonisJS code ? #1823
Answered
by
Banashek
wemersonrv
asked this question in
Help
-
Hello guys THere is a way to run SO shell commands as privileged user ? I need to restart or shutdown the server, stuffs like that. There is a way to do that ? |
Beta Was this translation helpful? Give feedback.
Answered by
Banashek
Nov 1, 2020
Replies: 1 comment 3 replies
-
Could you elaborate a bit more? Do you mean that you want to shut down or restart the operating system from the web application? Perhaps you could explain what your goal is if so. One way to do that (if it's your goal) would be to just use node's |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
wemersonrv
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Could you elaborate a bit more?
Do you mean that you want to shut down or restart the operating system from the web application? Perhaps you could explain what your goal is if so.
One way to do that (if it's your goal) would be to just use node's
child_process.exec
to call the shell's shutdown command (shutdown now
orshutdown -r now
for some linuxes).