Remote shutdown alternatives?

Suggestions for features and software you would like to see in DietPi, goes here.
Post Reply
Wolfgan
Posts: 16
Joined: Tue May 31, 2016 10:56 pm

Remote shutdown alternatives?

Post by Wolfgan »

I use my RasPi with DietPi as a file/media server between some other uses. When time to shut it down arrives, I ssh into it and issue a "sudo shutdown" command.

That solution is not wife friendly, so I was looking for options for a simple, web based shutdown feature and found:
* node.js based https://github.com/ryarnyah/nodejs-rpi-controller
* python based https://github.com/OSliusarenko/pishutdown
* shellinabox based solutions, but a pain to configure it

Are there any other alternative around? Any preference for the ones listed above?
Thx, Wolf.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Remote shutdown alternatives?

Post by Fourdee »

Wolfgan wrote:I use my RasPi with DietPi as a file/media server between some other uses. When time to shut it down arrives, I ssh into it and issue a "sudo shutdown" command.

That solution is not wife friendly, so I was looking for options for a simple, web based shutdown feature and found:
* node.js based https://github.com/ryarnyah/nodejs-rpi-controller
* python based https://github.com/OSliusarenko/pishutdown
* shellinabox based solutions, but a pain to configure it

Are there any other alternative around? Any preference for the ones listed above?
Thx, Wolf.
If you have a L**P webserver stack installed, you could create a basic php page to shutdown the system: https://yatb.giacomodrago.com/en/post/1 ... cript.html

I think some of the DietPi-Software system stat programs have a shutdown feature built-in. Its been a while, so i'am not sure which ones have the feature, and/or if the shutdown feature will work: http://dietpi.com/phpbb/viewtopic.php?f=8&t=5

Another option, if using windows, download Putty or Kitty SSH client. You can save the SSH user/pw settings for each system. All the user would need to do is double click the saved item, get automatically logged in, then type the shutdown command ;)
Attachments
putty.png
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: Remote shutdown alternatives?

Post by k-plan »

Hi,
Fourdee wrote:Another option, if using windows, download Putty or Kitty SSH client. You can save the SSH user/pw settings for each system. All the user would need to do is double click the saved item, get automatically logged in, then type the shutdown command
If you use "KiTTY" , you can configure a Auto-login plus an automatic command and a shot-cut to direct execute this save session. Without typing anything or to close terminal windows.

KiTTY : - http://www.9bis.net/kitty/

KiTTY : Automatic password - http://www.9bis.net/kitty/?page=Automat ... rd&zone=en
Auto-login
Auto-login
KiTTY : Automatic command - http://www.9bis.net/kitty/?page=Automat ... nd&zone=en
Automatic command
Automatic command
KiTTY : command-line option -

Code: Select all

 "kitty.exe -load "Session Name"" # Open a session automatic 
Open a session automatic via short-cut
Open a session automatic via short-cut
poweroff-shortcut-on-Desktop
poweroff-shortcut-on-Desktop
shutdown.jpg (8.27 KiB) Viewed 9236 times
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
Wolfgan
Posts: 16
Joined: Tue May 31, 2016 10:56 pm

Re: Remote shutdown alternatives?

Post by Wolfgan »

Thanks guys for the comments. I was veering more into a browser based solution (the idea is for my wife to shutdown the RasPi using a phone browser from the internal home network only) rather than bind the command to a PC based solution; and due I try to be resource conscious in terms of packages installation, I'll try to avoid setting up a L**P server just for this feature.

I'll probably settle trying to develop an extension to something I have installed already. We've discussed using RPI-Monitor for that feature a while ago (https://github.com/Fourdee/DietPi/issue ... -203043241) but I couldn't make it work (I can't even get shellinabox to work... grrr)

Anyways, I'll make sure to contribute it back if I found a suitable solution.
Thanks! Wolf.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Remote shutdown alternatives?

Post by Fourdee »

k-plan wrote:and a shot-cut to direct execute this save session. Without typing anything or to close terminal windows.
Very nice, great guide!
I didn't know that feature existed and i've been using Kitty, pretty much daily for years lol.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: Remote shutdown alternatives?

Post by k-plan »

Hi Wolf,
Wolfgan wrote:that feature a while ago (https://github.com/Fourdee/DietPi/issue ... -203043241) but I couldn't make it work (I can't even get shellinabox to work... grrr)
Hmm .. I have tested it referred to the how-to, which is link in my GitHub posting: http://www.tecmint.com/shell-in-a-box-a ... x-servers/ or use this: http://rasptorial.com/monitor/rpi-monitor

I don't like to have shell-in-a-box root login, so I adduser for example "odroid".
Wolfgan wrote: a browser based solution (the idea is for my wife to shutdown the RasPi using a phone browser from the internal home network only)
Browser based => use https://willy-tech.de/pi-control/ (Version: 1.3.3) like I have described in the GitHub posting .
Your wife smart phone has running android?
pi-control has as well a Android App: https://play.google.com/store/apps/deta ... .picontrol

Or a alternative way is to use a tv-remote control with e.g. https://flirc.tv/more/flirc-usb
No driver or additional software is need for this and flirc can acts as a keyboard.

http://raspberrycompote.blogspot.de/201 ... ebian.html

example:
Modifying Ctrl+Alt+Del behavior = ctrl-alt-del.target => poweroff
Program in Flirc GUI ( https://flirc.zendesk.com/hc/en-us/arti ... t-up-Flirc ) any ir-remote button as "Ctrl+Alt+Del"

Or a hardware button switch with a Python script: http://www.instructables.com/id/Simple- ... /?ALLSTEPS
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
Wolfgan
Posts: 16
Joined: Tue May 31, 2016 10:56 pm

Re: Remote shutdown alternatives?

Post by Wolfgan »

Good tips, thx K-plan. I'll try the suggestions and report it back.
Post Reply