1 |
On Mon, Dec 19, 2016 at 9:52 AM, Marc Joliet <marcec@×××.de> wrote: |
2 |
|
3 |
> When people compare systemd unit files to init scripts, they usually |
4 |
> mean *raw* (LSB?) sysvinit scripts (as IIUC Debian use{s,d}), with all |
5 |
> of their ridiculous amounts of boilerplate. |
6 |
|
7 |
The latest Debian init.d skeleton uses "#!/lib/init/init-d-script" as |
8 |
its shebang |
9 |
|
10 |
<BEGIN> |
11 |
th@localhost ~ $ cat /etc/init.d/skeleton |
12 |
#!/bin/sh |
13 |
# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing. |
14 |
if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then |
15 |
set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script |
16 |
fi |
17 |
### BEGIN INIT INFO |
18 |
# Provides: skeleton |
19 |
# Required-Start: $remote_fs $syslog |
20 |
# Required-Stop: $remote_fs $syslog |
21 |
# Default-Start: 2 3 4 5 |
22 |
# Default-Stop: 0 1 6 |
23 |
# Short-Description: Example initscript |
24 |
# Description: This file should be used to construct scripts to be |
25 |
# placed in /etc/init.d. This example start a |
26 |
# single forking daemon capable of writing a pid |
27 |
# file. To get other behavoirs, implemend |
28 |
# do_start(), do_stop() or other functions to |
29 |
# override the defaults in /lib/init/init-d-script. |
30 |
### END INIT INFO |
31 |
|
32 |
# Author: Foo Bar <foobar@×××.org> |
33 |
# |
34 |
# Please remove the "Author" lines above and replace them |
35 |
# with your own name if you copy and modify this script. |
36 |
|
37 |
DESC="Description of the service" |
38 |
DAEMON=/usr/sbin/daemonexecutablename |
39 |
</END> |
40 |
|
41 |
You can source an environment file and add "DAEMON_ARGS=" should you |
42 |
need to do so. |
43 |
|
44 |
This was created in the debian-devel@ systemd thread by the |
45 |
sysinit/sysvrc maintainer. |