Skip to content

Instantly share code, notes, and snippets.

@Unitech
Created October 30, 2020 00:53
Show Gist options
  • Select an option

  • Save Unitech/990e697cdd154682c2f49a281d8854ef to your computer and use it in GitHub Desktop.

Select an option

Save Unitech/990e697cdd154682c2f49a281d8854ef to your computer and use it in GitHub Desktop.

Revisions

  1. Unitech created this gist Oct 30, 2020.
    23 changes: 23 additions & 0 deletions stop_start.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    my_dir="`dirname \"$0\"`"
    my_dir="`( cd \"$my_dir\" && pwd )`"
    if [ -z "$my_dir" ] ; then
    exit 1
    fi
    . $my_dir/utilities.sh


    set_shutdown_time '??' '22' '38'
    set_startup_time '??' '22' '39' '00'

    # output RTC time
    rtctime='>>> Your RTC time is: '
    rtctime+="$(get_rtc_time)"
    echo "$rtctime"

    systime='>>> Your system time is: '
    systime+="$(get_sys_time)"
    echo "$systime"

    shutdown_time=$(get_local_date_time "$(get_shutdown_time)")

    echo $shutdown_time