<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                這次摘錄一個Mac大俠編寫的腳本,這個腳本在7pm后,在沒有用戶使用時試圖關機,如果有用戶登陸則試圖進入休眠模式. 管理員可以在StartupItem中加入,使之運行. 使網絡環境更綠色. ~~~ 如下: #!/bin/sh # Sleep or shutdown script # tryin' to be 'green'..... # look for exception file if [ -f "/var/db/.dontSleep" ]; then exit 0 fi # if we're a laptop, exit. # No shutting down laptops (or waking them up unbidden!) IS_LAPTOP=`/usr/sbin/system_profiler SPHardwareDataType | grep "Model" | grep "Book"` if [ "$IS_LAPTOP" != "" ]; then exit 0 fi # check the time; exit if it's between 5 am and 7 pm current_hour=`/bin/date +%H` if [ $current_hour -gt 5 -a $current_hour -lt 19 ]; then exit 0 fi # now check idle time; # exit if we've been idle less than 20 minutes idleTime=`ioreg -c IOHIDSystem | perl -ane 'if (/Idle/) {$idle=int((pop @F)/1000000000); print $idle,"/n"; last}'` if [ $idleTime -lt 1200 ]; then exit 0 fi # tell Power Manager to wake us up or turn us on at 6am M-F pmset repeat wakeorpoweron MTWRF 06:00:00 # check to see if a user's logged into the console login_status=`/usr/bin/who | /usr/bin/awk '{ print $2 }'` for i in $login_status; do if [ $i = "console" ]; then # someone's logged in, sleep osascript -e 'tell application "System Events" to sleep' exit 0 fi done # if we got this far, it's OK to shut down. /sbin/shutdown -h now exit 0 ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看