summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/shutdown/node.def10
1 files changed, 8 insertions, 2 deletions
diff --git a/templates/shutdown/node.def b/templates/shutdown/node.def
index 4185f40..81cbc5f 100644
--- a/templates/shutdown/node.def
+++ b/templates/shutdown/node.def
@@ -1,3 +1,9 @@
help: Shutdown the system
-run: ${vyatta_bindir}/yesno -y "Proceed with shutdown? [confirm]" \
- && sudo /sbin/shutdown -h now
+run: if [ "$VYATTA_PROCESS_CLIENT" == "gui2_rest" ]
+ then
+ sudo /sbin/shutdown -h now
+ else
+ ${vyatta_bindir}/yesno -y "Proceed with shutdown? [confirm]" \
+ && sudo /sbin/shutdown -h now
+ fi
+