⇤ ← Revision 1 as of 2014-01-09 14:01:16
Size: 237
Comment:
|
Size: 964
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 6: | Line 6: |
== Sample service blah == File in /etc/init.d/blah with chmod 755: {{{#!highlight bash #! /bin/sh # /etc/init.d/blah # # Some things that run always touch /var/lock/blah # Carry out specific functions when asked to by the system case "$1" in start) echo "Starting script blah " echo "Could do more here" ;; stop) echo "Stopping script blah" echo "Could do more here" ;; *) echo "Usage: /etc/init.d/blah {start|stop}" exit 1 ;; esac exit 0 }}} == Add service == * update-rc.d blah defaults * update-rc.d blah defaults 20 80 * update-rc.d blah start 20 2 3 4 . start 30 5 . stop 80 0 1 6 . == Remove service == * update-rc.d -f blah remove |
Debian
Debian is a free operating system (OS) for your computer. An operating system is the set of basic programs and utilities that make your computer run.
All packages list
http://packages.debian.org/stable/allpackages
Sample service blah
File in /etc/init.d/blah with chmod 755:
1 #! /bin/sh
2 # /etc/init.d/blah
3 #
4
5 # Some things that run always
6 touch /var/lock/blah
7
8 # Carry out specific functions when asked to by the system
9 case "$1" in
10 start)
11 echo "Starting script blah "
12 echo "Could do more here"
13 ;;
14 stop)
15 echo "Stopping script blah"
16 echo "Could do more here"
17 ;;
18 *)
19 echo "Usage: /etc/init.d/blah {start|stop}"
20 exit 1
21 ;;
22 esac
23
24 exit 0
Add service
- update-rc.d blah defaults
- update-rc.d blah defaults 20 80
- update-rc.d blah start 20 2 3 4 . start 30 5 . stop 80 0 1 6 .
Remove service
- update-rc.d -f blah remove