mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-24 12:30:20 +00:00
Detach all devices when shutting down/restarting (#323)
* Detach all before shutting down / restarting * Additional message
This commit is contained in:
parent
fa12f49078
commit
9bd0b9802b
@ -448,20 +448,26 @@ def device_info():
|
||||
|
||||
@app.route("/pi/reboot", methods=["POST"])
|
||||
def restart():
|
||||
flash("Restarting the Pi momentarily...")
|
||||
detach_all()
|
||||
flash("Safely detached all devices.")
|
||||
flash("Rebooting the Pi momentarily...")
|
||||
reboot_pi()
|
||||
return redirect(url_for("index"))
|
||||
|
||||
|
||||
@app.route("/rascsi/restart", methods=["POST"])
|
||||
def rascsi_restart():
|
||||
rascsi_service("restart")
|
||||
detach_all()
|
||||
flash("Safely detached all devices.")
|
||||
flash("Restarting RaSCSI Service...")
|
||||
rascsi_service("restart")
|
||||
return redirect(url_for("index"))
|
||||
|
||||
|
||||
@app.route("/pi/shutdown", methods=["POST"])
|
||||
def shutdown():
|
||||
detach_all()
|
||||
flash("Safely detached all devices.")
|
||||
flash("Shutting down the Pi momentarily...")
|
||||
shutdown_pi()
|
||||
return redirect(url_for("index"))
|
||||
|
Loading…
Reference in New Issue
Block a user