User Tools

Site Tools


packages:userscripts

Differences

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

Link to this comparison view

Next revision
Previous revision
packages:userscripts [2011-01-31 04:01]
SamChi - very simple description
packages:userscripts [2011-02-02 21:37]
SamChi - note about restart and reload
Line 1: Line 1:
-rc-scripts-user allows users to run scripts at system startup and shutdown. ​ 
- 
-Create ~/​.config/​init.d/​script_name. It must accept one argument, it will be either "​start"​ or "​stop"​. ​ 
- 
-Example ~/​.config/​init.d/​irssi ​ 
- 
-<​file>#​!/​bin/​sh 
- 
-case "​$1"​ in 
-        start) 
-                if ! pidof irssi > /dev/null; then 
-                        screen -d -m -S irssi irssi 
-                fi 
-                ;; 
-        stop) 
-                # assuming someone creates it 
-                irssi_remote /quit 
- 
-                sleep 1 
-                killall -INT irssi 
-                ;; 
-esac 
-</​file>​ 
  
packages/userscripts.txt ยท Last modified: 2011-02-02 21:37 by SamChi