diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/show/shutdown/node.def | 8 | ||||
-rw-r--r-- | templates/shutdown/at/node.tag/node.def | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/templates/show/shutdown/node.def b/templates/show/shutdown/node.def new file mode 100644 index 0000000..ecc8c4b --- /dev/null +++ b/templates/show/shutdown/node.def @@ -0,0 +1,8 @@ +help: Show scheduled shutdown +run: if [ -f /var/run/shutdown.pid ] + then if [ -r /tmp/shutdown.at ] + then echo -n "Shutdown pending at"; cat /tmp/shutdown.at + else echo "Shutdown pending" + fi + else echo "No shutdown pending" + fi diff --git a/templates/shutdown/at/node.tag/node.def b/templates/shutdown/at/node.tag/node.def index 13cbaa1..94cd332 100644 --- a/templates/shutdown/at/node.tag/node.def +++ b/templates/shutdown/at/node.tag/node.def @@ -1,3 +1,5 @@ help: Shutdown the system at a future time allowed: echo -n '<HH:MM>' '<MMDDYY>' '+MM' -run: sudo /sbin/shutdown -h $3 & +run: if /opt/vyatta/bin/vyatta-gettime.pl $3 >/tmp/shutdown.at + then sudo /sbin/shutdown -h $3 & + fi |