100 | | 1. Compile start-stop-daemon from source as detailed in [[start-stop-daemon]]. |
| 100 | |
| 101 | |
| 102 | == Compile start-stop-daemon == |
| 103 | |
| 104 | start-stop-daemon is part of Debian's dpkg (Debian package manager) package. But as other distributions obviously do not ship it and some Debian 6 and older do not ship a recent enough version we will compile it from source. Compiling only requires an installation of '''gcc'''. |
| 105 | |
| 106 | '''If you get any errors during compilation (e.g. because of missing headers) please [[Author|inform me]] so I can update this page.''' |
| 107 | |
| 108 | 1. The source of the tool is shipped with the scripts so switch to its directory: |
| 109 | {{{ |
| 110 | cd /usr/local/lib/7dtd/start-stop-daemon |
| 111 | }}} |
| 112 | 1. Compile it by running make (with makefile) '''or''' directly invoke gcc: |
| 113 | * |
| 114 | {{{ |
| 115 | make |
| 116 | }}} |
| 117 | * |
| 118 | {{{ |
| 119 | gcc -o start-stop-daemon start-stop-daemon.c |
| 120 | }}} |
| 121 | 1. Make sure it is owned by root and only writable by root, again either by running make '''or''' do it manually: |
| 122 | * |
| 123 | {{{ |
| 124 | make install |
| 125 | }}} |
| 126 | * |
| 127 | {{{ |
| 128 | chown root.root start-stop-daemon |
| 129 | chmod 0755 start-stop-daemon |
| 130 | }}} |