source: systemd-units/Makefile@ a9521f3

systemd-11177
Last change on this file since a9521f3 was 2d57c6f3, checked in by Krejzi <krejzi@…>, 10 years ago

Convert php to systemd.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@13515 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 13.7 KB
Line 
1SHELL=/bin/bash
2
3EXTDIR=${DESTDIR}/etc
4DEFAULTSDIR=${DESTDIR}/etc/default
5SERVICEDIR=${DESTDIR}/lib/services
6TMPFILESDIR=${DESTDIR}/usr/lib/tmpfiles.d
7UNITSDIR=${DESTDIR}/lib/systemd/system
8MODE=755
9DIRMODE=755
10CONFMODE=644
11
12all:
13 @grep "^install" Makefile.systemd | cut -d ":" -f 1
14 @echo "Select an appropriate install target from the above list"
15
16create-dirs:
17 install -d -m ${DIRMODE} ${DEFAULTSDIR}
18 install -d -m ${DIRMODE} ${TMPFILESDIR}
19 install -d -m ${DIRMODE} ${UNITSDIR}
20
21create-service-dir:
22 install -d -m ${DIRMODE} ${EXTDIR}/sysconfig/network-devices/services
23 install -d -m ${DIRMODE} ${SERVICEDIR}
24
25install-service-dhclient: create-service-dir
26 install -m ${MODE} blfs/services/dhclient ${SERVICEDIR}
27
28install-service-dhcpcd: create-service-dir
29 install -m ${MODE} blfs/services/dhcpcd ${SERVICEDIR}
30
31install-service-bridge: create-service-dir
32 install -m ${MODE} blfs/services/bridge ${SERVICEDIR}
33
34install-service-wpa: create-service-dir
35 install -m ${MODE} blfs/services/wpa ${SERVICEDIR}
36
37install-acpid: create-dirs
38 install -m ${CONFMODE} blfs/units/acpid.service ${UNITSDIR}/
39 install -m ${CONFMODE} blfs/units/acpid.socket ${UNITSDIR}/
40 systemctl enable acpid.socket
41
42install-dhcpd: create-dirs
43 install -m ${CONFMODE} blfs/default/dhcpd ${DEFAULTSDIR}/
44 install -m ${CONFMODE} blfs/units/dhcpd.service ${UNITSDIR}/
45 systemctl enable dhcpd.service
46
47install-exim: create-dirs
48 install -m ${CONFMODE} blfs/units/exim.service ${UNITSDIR}/
49 systemctl enable exim.service
50
51install-git: create-dirs
52 install -m ${CONFMODE} blfs/units/git-daemonat.service ${UNITSDIR}/git-daemon@.service
53 install -m ${CONFMODE} blfs/units/git-daemon.socket ${UNITSDIR}/
54 systemctl enable git-daemon.socket
55
56install-gpm: create-dirs
57 install -m ${CONFMODE} blfs/units/gpm.service ${UNITSDIR}/
58 systemctl enable gpm.service
59
60install-haveged: create-dirs
61 install -m ${CONFMODE} blfs/units/haveged.service ${UNITSDIR}/
62 systemctl enable haveged.service
63
64install-httpd: create-dirs
65 install -m ${CONFMODE} blfs/tmpfiles/httpd.conf ${TMPFILESDIR}/
66 install -m ${CONFMODE} blfs/units/httpd.service ${UNITSDIR}/
67 systemd-tmpfiles --create httpd.conf
68 systemctl enable httpd.service
69
70install-iptables: create-dirs
71 install -m ${CONFMODE} blfs/units/iptables.service ${UNITSDIR}/
72 systemctl enable iptables.service
73
74install-kdm: create-dirs
75 install -m ${CONFMODE} blfs/units/kdm.service ${UNITSDIR}/
76 systemctl enable kdm.service
77
78install-krb5: create-dirs
79 install -m ${CONFMODE} blfs/units/krb5-kdc.service ${UNITSDIR}/
80 install -m ${CONFMODE} blfs/units/krb5-kpropd.service ${UNITSDIR}/
81 install -m ${CONFMODE} blfs/units/krb5-kadmind.service ${UNITSDIR}/
82 systemctl enable krb5-kdc.service
83 systemctl enable krb5-kpropd.service
84 systemctl enable krb5-kadmind.service
85
86install-mysqld: create-dirs
87 install -m ${CONFMODE} blfs/tmpfiles/mysqld.conf ${TMPFILESDIR}/
88 install -m ${CONFMODE} blfs/units/mysqld.service ${UNITSDIR}/
89 systemd-tmpfiles --create mysqld.conf
90 systemctl enable mysqld.service
91
92install-named: create-dirs
93 install -m ${CONFMODE} blfs/tmpfiles/named.conf ${TMPFILESDIR}/
94 install -m ${CONFMODE} blfs/units/named.service ${UNITSDIR}/
95 systemd-tmpfiles --create named.conf
96 systemctl enable named.service
97
98install-nfs-client: create-dirs
99 install -m ${CONFMODE} blfs/default/nfs-utils ${DEFAULTSDIR}/
100 install -m ${CONFMODE} blfs/units/rpc-statd.service ${UNITSDIR}/
101 install -m ${CONFMODE} blfs/units/nfs-client.target ${UNITSDIR}/
102 systemctl enable rpc-statd.service
103
104install-nfs-server: install-nfs-client
105 install -m ${CONFMODE} blfs/units/nfsd.service ${UNITSDIR}/
106 install -m ${CONFMODE} blfs/units/rpc-mountd.service ${UNITSDIR}/
107 install -m ${CONFMODE} blfs/units/nfs-server.target ${UNITSDIR}/
108 install -m ${CONFMODE} blfs/units/proc-fs-nfsd.mount ${UNITSDIR}/
109 systemctl enable nfsd.service
110 systemctl enable rpc-mountd.service
111
112install-ntpd: create-dirs
113 install -m ${CONFMODE} blfs/units/ntpd.service ${UNITSDIR}/
114 install -d -m ${DIRMODE} ${DESTDIR}/usr/lib/systemd/ntp-units.d
115 echo "ntpd.service" > ${DESTDIR}/usr/lib/systemd/ntp-units.d/ntp.list
116 systemctl enable ntpd.service
117
118install-php-fpm: create-dirs
119 install -m ${CONFMODE} blfs/units/php-fpm.service ${UNITSDIR}/
120 systemctl enable php-fpm.service
121
122install-postfix: create-dirs
123 install -m ${CONFMODE} blfs/units/postfix.service ${UNITSDIR}/
124 systemctl enable postfix.service
125
126install-postgresql: create-dirs
127 install -m ${CONFMODE} blfs/tmpfiles/postgresql.conf ${TMPFILESDIR}/
128 install -m ${CONFMODE} blfs/units/postgresql.service ${UNITSDIR}/
129 systemd-tmpfiles --create postgresql.conf
130 systemctl enable postgresql.service
131
132install-proftpd: create-dirs
133 install -m ${CONFMODE} blfs/units/proftpd.service ${UNITSDIR}/
134 systemctl enable proftpd.service
135
136install-rpcbind: create-dirs
137 install -m ${CONFMODE} blfs/units/rpcbind.service ${UNITSDIR}/
138 systemctl enable rpcbind.service
139
140install-rsyncd: create-dirs
141 install -m ${CONFMODE} blfs/units/rsyncd.service ${UNITSDIR}/
142 install -m ${CONFMODE} blfs/units/rsyncdat.service ${UNITSDIR}/rsyncd@.service
143 install -m ${CONFMODE} blfs/units/rsyncd.socket ${UNITSDIR}/
144 systemctl enable rsyncd.service
145
146install-samba: create-dirs
147 install -m ${CONFMODE} blfs/default/samba ${DEFAULTSDIR}/
148 install -m ${CONFMODE} blfs/tmpfiles/samba.conf ${TMPFILESDIR}/
149 install -m ${CONFMODE} blfs/units/nmbd.service ${UNITSDIR}/
150 install -m ${CONFMODE} blfs/units/smbd.service ${UNITSDIR}/
151 install -m ${CONFMODE} blfs/units/smbdat.service ${UNITSDIR}/smbd@.service
152 install -m ${CONFMODE} blfs/units/smbd.socket ${UNITSDIR}/
153 systemd-tmpfiles --create samba.conf
154 systemctl enable nmbd.service
155 systemctl enable smbd.service
156
157install-saslauthd: create-dirs
158 install -m ${CONFMODE} blfs/default/saslauthd ${DEFAULTSDIR}/
159 install -m ${CONFMODE} blfs/tmpfiles/saslauthd.conf ${TMPFILESDIR}/
160 install -m ${CONFMODE} blfs/units/saslauthd.service ${UNITSDIR}/
161 systemd-tmpfiles --create saslauthd.conf
162 systemctl enable saslauthd.service
163
164install-sendmail: create-dirs
165 install -m ${CONFMODE} blfs/default/sendmail ${DEFAULTSDIR}/
166 install -m ${CONFMODE} blfs/units/sm-client.service ${UNITSDIR}/
167 install -m ${CONFMODE} blfs/units/sendmail.service ${UNITSDIR}/
168 systemctl enable sendmail.service
169
170install-slapd: create-dirs
171 install -m ${CONFMODE} blfs/default/slapd ${DEFAULTSDIR}/
172 install -m ${CONFMODE} blfs/tmpfiles/slapd.conf ${TMPFILESDIR}/
173 install -m ${CONFMODE} blfs/units/slapd.service ${UNITSDIR}/
174 systemd-tmpfiles --create slapd.conf
175 systemctl enable slapd.service
176
177install-sshd: create-dirs
178 install -m ${CONFMODE} blfs/units/sshd.service ${UNITSDIR}/
179 install -m ${CONFMODE} blfs/units/sshdat.service ${UNITSDIR}/sshd@.service
180 install -m ${CONFMODE} blfs/units/sshd.socket ${UNITSDIR}/
181 systemctl enable sshd.service
182
183install-svnserve: create-dirs
184 install -m ${CONFMODE} blfs/default/svnserve ${DEFAULTSDIR}/
185 install -m ${CONFMODE} blfs/tmpfiles/svnserve.conf ${TMPFILESDIR}/
186 install -m ${CONFMODE} blfs/units/svnserve.service ${UNITSDIR}/
187 systemd-tmpfiles --create svnserve.conf
188 systemctl enable svnserve.service
189
190install-unbound: create-dirs
191 install -m ${CONFMODE} blfs/units/unbound.service ${UNITSDIR}/
192 systemctl enable unbound.service
193
194install-vsftpd: create-dirs
195 install -m ${CONFMODE} blfs/units/vsftpd.service ${UNITSDIR}/
196 systemctl enable vsftpd.service
197
198install-winbindd: install-samba
199 install -m ${CONFMODE} blfs/units/winbindd.service ${UNITSDIR}/
200 systemctl enable winbindd.service
201
202install-xinetd: create-dirs
203 install -m ${CONFMODE} blfs/units/xinetd.service ${UNITSDIR}/
204 systemctl enable xinetd.service
205
206uninstall-acpid:
207 systemctl stop acpid.service
208 systemctl disable acpid.socket
209 rm -f ${UNITSDIR}/acpid.service ${UNITSDIR}/acpid.socket
210
211uninstall-dhcpd:
212 systemctl stop dhcpd.service
213 systemctl disable dhcpd.service
214 rm -f ${DEFAULTSDIR}/dhcpd ${UNITSDIR}/dhcpd.service
215
216uninstall-exim:
217 systemctl stop exim.service
218 systemctl disable exim.service
219 rm -f ${UNITSDIR}/exim.service
220
221uninstall-git:
222 systemctl stop git-daemon.socket
223 systemctl disable git-daemon.socket
224 rm -f ${UNITSDIR}/git-daemon@.service ${UNITSDIR}/git-daemon.socket
225
226uninstall-gpm:
227 systemctl stop gpm.service
228 systemctl disable gpm.service
229 rm -f ${UNITSDIR}/gpm.service
230
231uninstall-haveged:
232 systemctl stop haveged.service
233 systemctl disable haveged.service
234 rm -f ${UNITSDIR}/haveged.service
235
236uninstall-httpd:
237 systemctl stop httpd.service
238 systemctl disable httpd.service
239 rm -f ${TMPFILESDIR}/httpd.conf ${UNITSDIR}/httpd.service
240
241uninstall-iptables:
242 systemctl disable iptables.service
243 rm -f ${UNITSDIR}/iptables.service
244
245uninstall-kdm:
246 systemctl stop kdm.service
247 systemctl disable kdm.service
248 rm -f ${UNITSDIR}/kdm.service
249
250uninstall-krb5:
251 systemctl stop krb5-kadmind.service
252 systemctl stop krb5-kpropd.service
253 systemctl stop krb5-kdc.service
254 systemctl disable krb5-kadmind.service
255 systemctl disable krb5-kpropd.service
256 systemctl disable krb5-kdc.service
257 rm -f ${UNITSDIR}/krb5-kadmind.service ${UNITSDIR}/krb5-kpropd.service ${UNITSDIR}/krb5-kdc.service
258
259uninstall-mysqld:
260 systemctl stop mysqld.service
261 systemctl disable mysqld.service
262 rm -f ${TMPFILESDIR}/mysqld.conf ${UNITSDIR}/mysqld.service
263
264uninstall-named:
265 systemctl stop named.service
266 systemctl disable named.service
267 rm -f ${TMPFILESDIR}/named.conf ${UNITSDIR}/named.service
268
269uninstall-nfs-client: uninstall-nfs-server
270 systemctl stop rpc-statd.service
271 systemctl disable rpc-statd.service
272 systemctl disable nfs-client.target
273 rm -f ${DEFAULTSDIR}/nfs-utils ${UNITSDIR}/rpc-statd.service
274 rm -f ${UNITSDIR}/nfs-client.target
275
276uninstall-nfs-server:
277 [ -e ${UNITSDIR}/rpc-mountd.service ] && systemctl stop rpc-mountd.service
278 [ -e ${UNITSDIR}/nfsd.service ] && systemctl stop nfsd.service
279 systemctl disable rpc-mountd.service
280 systemctl disable nfsd.service
281 systemctl disable nfs-server.target
282 rm -f ${UNITSDIR}/nfsd.service ${UNITSDIR}/rpc-mountd.service
283 rm -f ${UNITSDIR}/nfs-server.target ${UNITSDIR}/proc-fs-nfsd.mount
284
285uninstall-ntpd:
286 systemctl stop ntpd.service
287 systemctl disable ntpd.service
288 rm -f ${UNITSDIR}/ntpd.service ${DESTDIR}/usr/lib/systemd/ntp-units.d/ntp.list
289
290uninstall-php-fpm:
291 systemctl stop php-fpm.service
292 systemctl disable php-fpm.service
293 rm -f ${UNITSDIR}/php-fpm.service
294
295uninstall-postfix:
296 systemctl stop postfix.service
297 systemctl disable postfix.service
298 rm -f ${UNITSDIR}/postfix.service
299
300uninstall-postgresql:
301 systemctl stop postgresql.service
302 systemctl disable postgresql.service
303 rm -f ${TMPFILESDIR}/postgresql.conf ${UNITSDIR}/postgresql.service
304
305uninstall-proftpd:
306 systemctl stop proftpd.service
307 systemctl disable proftpd.service
308 rm -f ${UNITSDIR}/proftpd.service
309
310uninstall-rpcbind:
311 systemctl stop rpcbind.service
312 systemctl disable rpcbind.service
313 rm -f ${UNITSDIR}/rpcbind.service
314
315uninstall-rsyncd:
316 systemctl stop rsyncd.socket
317 systemctl stop rsyncd.service
318 rm -f ${UNITSDIR}/rsyncd.service ${UNITSDIR}/rsyncd@.service
319 rm -f ${UNITSDIR}/rsyncd.socket
320
321uninstall-samba: uninstall-winbindd
322 systemctl stop smbd.socket
323 systemctl stop smbd.service
324 systemctl stop nmbd.service
325 systemctl disable smbd.socket
326 systemctl disable smbd.service
327 systemctl disable nmbd.service
328 rm -f ${DEFAULTSDIR}/samba ${TMPFILESDIR}/samba.conf ${UNITSDIR}/nmbd.service
329 rm -f ${UNITSDIR}/smbd.service ${UNITSDIR}/smbd@.service ${UNITSDIR}/smbd.socket
330
331uninstall-saslauthd:
332 systemctl stop saslauthd.service
333 systemctl disable saslauthd.service
334 rm -f ${DEFAULTSDIR}/saslauthd ${TMPFILESDIR}/saslauthd.conf ${UNITSDIR}/saslauthd.service
335
336uninstall-sendmail:
337 systemctl stop sendmail.service
338 systemctl disable sendmail.service
339 rm -f ${DEFAULTSDIR}/sendmail ${UNITSDIR}/sm-client.service ${UNITSDIR}/sendmail.service
340
341uninstall-slapd:
342 systemctl stop slapd.service
343 systemctl disable slapd.service
344 rm -f ${DEFAULTSDIR}/slapd ${TMPFILESDIR}/slapd.conf ${UNITSDIR}/slapd.service
345
346uninstall-sshd:
347 systemctl stop sshd.socket
348 systemctl stop sshd.service
349 systemctl disable sshd.socket
350 systemctl disable sshd.service
351 rm -f ${UNITSDIR}/sshd.service ${UNITSDIR}/sshd@.service ${UNITSDIR}/sshd.socket
352
353uninstall-svnserve:
354 systemctl stop svnserve.service
355 systemctl disable svnserve.service
356 rm -f ${DEFAULTSDIR}/svnserve ${TMPFILESDIR}/svnserve.conf ${UNITSDIR}/svnserve.service
357
358uninstall-unbound:
359 systemctl stop unbound.service
360 systemctl disable unbound.service
361 rm -f ${UNITSDIR}/unbound.service
362
363uninstall-vsftpd:
364 systemctl stop vsftpd.service
365 systemctl disable vsftpd.service
366 rm -f ${UNITSDIR}/vsftpd.service
367
368uninstall-winbindd:
369 systemctl stop winbindd.service
370 systemctl disable winbindd.service
371 rm -f ${UNITSDIR}/winbindd.service
372
373uninstall-xinetd:
374 systemctl stop xinetd.service
375 systemctl disable xinetd.service
376 rm -f ${UNITSDIR}/xinetd.service
377
378.PHONY: all create-dirs create-service-dir \
379 install-service-dhclient \
380 install-service-dhcpcd \
381 install-service-bridge \
382 install-service-ipx \
383 install-service-pppoe \
384 install-service-wpa \
385 install-acpid \
386 install-dhcpd \
387 install-exim \
388 install-git \
389 install-gpm \
390 install-httpd \
391 install-iptables \
392 install-kdm \
393 install-krb5 \
394 install-mysqld \
395 install-named \
396 install-nfs-client \
397 install-nfs-server \
398 install-ntp \
399 install-php-fpm \
400 install-postfix \
401 install-postgresql \
402 install-proftpd \
403 install-rpcbind \
404 install-rsyncd \
405 install-samba \
406 install-saslauthd \
407 install-sendmail \
408 install-slapd \
409 install-sshd \
410 install-svnserve \
411 install-unbound \
412 install-vsftpd \
413 install-winbindd \
414 install-xinetd \
415 uninstall-acpid \
416 uninstall-dhcpd \
417 uninstall-exim \
418 uninstall-git \
419 uninstall-gpm \
420 uninstall-httpd \
421 uninstall-iptables \
422 uninstall-kdm \
423 uninstall-krb5 \
424 uninstall-mysqld \
425 uninstall-named \
426 uninstall-nfs-client \
427 uninstall-nfs-server \
428 uninstall-ntpd \
429 uninstall-php-fpm \
430 uninstall-postfix \
431 uninstall-postgresql \
432 uninstall-proftpd \
433 uninstall-rpcbind \
434 uninstall-rsyncd \
435 uninstall-samba \
436 uninstall-saslauthd \
437 uninstall-sendmail \
438 uninstall-slapd \
439 uninstall-sshd \
440 uninstall-svnserve \
441 uninstall-unbound \
442 uninstall-vsftpd \
443 uninstall-winbindd \
444 uninstall-xinetd
Note: See TracBrowser for help on using the repository browser.