Skip to content

Commit

Permalink
[script] autoapp_helper
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkeyexp committed Jul 13, 2018
1 parent d6fdba9 commit 9b0fba9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions stage2/03-crankshaft-base/files/usr/local/bin/autoapp_helper
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,20 @@ fi

if [ $1 == "getdisconnect" ]; then
remaining=$(systemctl list-timers disconnect.timer | grep left | cut -dl -f1 | awk {'print $5 $6'})
value="| Stopped"
value="Stopped"
if [ ! -z $remaining ]; then
value="| $remaining left"
value="$remaining left"
fi
echo "$DISCONNECTION_SCREEN_POWEROFF_SECS Seconds $value" > /tmp/return_value
echo "$DISCONNECTION_SCREEN_POWEROFF_SECS-$value" > /tmp/return_value
fi

if [ $1 == "getshutdown" ]; then
remaining=$(systemctl list-timers shutdown.timer | grep left | cut -dl -f1 | awk {'print $5 $6'})
value="| Stopped"
value="Stopped"
if [ ! -z $remaining ]; then
value="| $remaining left"
value="$remaining left"
fi
echo "$DISCONNECTION_POWEROFF_MINS Minutes $value" > /tmp/return_value
echo "$DISCONNECTION_POWEROFF_MINS-$value" > /tmp/return_value
fi

if [ $1 == "setdisconnect" ] && [ ! -z $2 ]; then
Expand Down

0 comments on commit 9b0fba9

Please sign in to comment.