Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
[Debian Server] Shutdown/Reboot through web interface
[Debian Server] Shutdown/Reboot through web interface
Can I shutdown or reboot my Debian server through a web interface? I'm looking for an application or preconfigured script.
- GarryRicketson
- Posts: 5644
- Joined: 2015-01-20 22:16
- Location: Durango, Mexico
Re: [Debian Server] Shutdown/Reboot through web interface
Via ssh you can
See :
Pay particular attention to the -r option:
pre configured script :
or use the other options as discussed in the manual.
With out any other details about the server, it is hard to say, and I am not responsible,
becuase I have know way of knowing how the server is set up, if it is "hosted" or
the providers have restrictions etc.
Some providers/hosting do have a "control panel" of some sort, that makes it
just a matter of clicking a button, you might be better off asking the provider or hosting
about this, to make sure there is someone that can re-boot it , if you have trouble, and
they could give you the details as to what the proceedure is.
If all you need to do is re-start the webserver. that would depend on what webserver
you have, for example, if it is apache2 on Debian 8 and up :
see
if it is "nginx", it is different, see the manual for nginx,...
See :
Code: Select all
man shutdown
I do not know why you would need a special application, orOPTIONS
-a Use /etc/shutdown.allow.
-k Don't really shutdown; only send the warning messages to every‐
body.
-r Reboot after shutdown.
pre configured script :
It is a simple command:I'm looking for an application or preconfigured script.
Code: Select all
shutdown -r now
With out any other details about the server, it is hard to say, and I am not responsible,
becuase I have know way of knowing how the server is set up, if it is "hosted" or
the providers have restrictions etc.
Some providers/hosting do have a "control panel" of some sort, that makes it
just a matter of clicking a button, you might be better off asking the provider or hosting
about this, to make sure there is someone that can re-boot it , if you have trouble, and
they could give you the details as to what the proceedure is.
If all you need to do is re-start the webserver. that would depend on what webserver
you have, for example, if it is apache2 on Debian 8 and up :
Code: Select all
systemctl restart apache2
Code: Select all
man apache2
"What we expect you have already Done"
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
Re: [Debian Server] Shutdown/Reboot through web interface
I'm puzzled why you'd want to do that rather than just reboot through your terminal via ssh.
DebianStable
Code: Select all
$ vrms
No non-free or contrib packages installed on debian! rms would be proud.
Re: [Debian Server] Shutdown/Reboot through web interface
You could...syncom wrote:Can I shutdown or reboot my Debian server through a web interface?
But why on Earth would you want to??
At best this idea means adding a new security point-of-failure in exchange for zero functionality.
If it sounds nonsensical to ask it in those terms ("Is it possible to add a new security point-of-failure in exchange for zero functionality?"), then that's a big clue why folks are wondering why you'd want to such a thing.
Re: [Debian Server] Shutdown/Reboot through web interface
Thanks everyone for reply. The machine is only an home-made mini server.
I followed this guide https://www.howtoforge.com/tutorial/per ... onfig-3-1/
I have installed Nut and now I can monitor 3 UPS in master/slave configuration, so it's principally for internal but educational purpose also. SSH for shutdown or reboot works very well but I prefer a web interface with two button. Webmin could be a solution but already I have ISPConfig and I don't want trouble...
I followed this guide https://www.howtoforge.com/tutorial/per ... onfig-3-1/
I have installed Nut and now I can monitor 3 UPS in master/slave configuration, so it's principally for internal but educational purpose also. SSH for shutdown or reboot works very well but I prefer a web interface with two button. Webmin could be a solution but already I have ISPConfig and I don't want trouble...
Re: [Debian Server] Shutdown/Reboot through web interface
Best advice to avoid trouble is not to install third-party Hosting Control Panels like ISPConfig and Webmin, which are not available — for good reasons— from official Debian repositories, but to learn to administer the server, in general, via the command line interface.syncom wrote:The machine is only an home-made mini server.
I followed this guide https://www.howtoforge.com/tutorial/per ... onfig-3-1/
I have installed Nut and now I can monitor 3 UPS in master/slave configuration, so it's principally for internal but educational purpose also. SSH for shutdown or reboot works very well but I prefer a web interface with two button. Webmin could be a solution but already I have ISPConfig and I don't want trouble...
DebianStable
Code: Select all
$ vrms
No non-free or contrib packages installed on debian! rms would be proud.
Re: [Debian Server] Shutdown/Reboot through web interface
Well, how about a minimal server in python and os module to signal to systemctl?
Or node-reboot which does not even need to call shutdown
https://github.com/egorfine/node-reboot
basically just take the simple example from node web site to create small web server. But insttad of hello world use node-reboot and two buttons:
Or node-reboot which does not even need to call shutdown
https://github.com/egorfine/node-reboot
basically just take the simple example from node web site to create small web server. But insttad of hello world use node-reboot and two buttons:
Code: Select all
const http = require('http');
const hostname = '127.0.0.1';
const port = 3000;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World\n');
});
server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});