Differences

This shows you the differences between two versions of the page.

Link to this comparison view

creating_suspend_and_resume_scripts [2017/03/12 19:24]
0.0.0.0 created
creating_suspend_and_resume_scripts [2017/03/16 13:15] (current)
cvh
Line 1: Line 1:
-====== ​Creating_Suspend_and_Resume_Scripts ​====== +====== ​Creating Suspend and Resume Scripts ​======
- +
-{{mininav|[[LibreELEC Configuration]]}} +
- +
-__NOTOC__+
  
 Scripts will reside in the following folder Scripts will reside in the following folder
- /​storage/​.config/​sleep.d+  ​/​storage/​.config/​sleep.d
  
 Scripts should be name similar to the following. Scripts should be name similar to the following.
- 01-script-name.power +  ​01-script-name.power 
- ​02-script-name.power+  02-script-name.power
  
 The scripts should also use the following format The scripts should also use the following format
  
-<​code>​ +<​code>#​!/​bin/​sh
-#!/bin/sh+
 case "​$1"​ in case "​$1"​ in
    pre)    pre)
Line 23: Line 18:
      <​do something on resume>      <​do something on resume>
      ;;      ;;
-esac +esac</​code>​
-</​code>​+
  
 Scripts are executed in numbered order and do not run in parallel, they run sequentially. Scripts are executed in numbered order and do not run in parallel, they run sequentially.
  
-{{divbox|amber||**NOTE:** No spaces or weird special characters that can not be handled without escaping in bash are allowed}}+<alert type="​warning"​ icon="​fa fa-info-circle">​**NOTE:** No spaces or weird special characters that can not be handled without escaping in bash are allowed</​alert>​
  
 [[Category:​Settings]] [[Category:​Settings]]