packages:userscripts
This is an old revision of the document!
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
#!/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
packages/userscripts.1296442885.txt.gz · Last modified: 2011-01-31 04:01 by SamChi