質問編集履歴
2
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -237,3 +237,63 @@
|
|
237
237
|
exit $RETVAL
|
238
238
|
|
239
239
|
```
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
------------------------------------------------
|
244
|
+
|
245
|
+
追記2:
|
246
|
+
|
247
|
+
質問内でlsof -i | grep httpdの実行結果を載せていなかったので、念のため追記致します。
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
```ここに言語を入力
|
252
|
+
|
253
|
+
httpd 8755 root 4u IPv6 54928 0t0 TCP *:http (LISTEN)
|
254
|
+
|
255
|
+
httpd 8755 root 6u IPv6 54937 0t0 TCP *:https (LISTEN)
|
256
|
+
|
257
|
+
httpd 8758 apache 4u IPv6 54928 0t0 TCP *:http (LISTEN)
|
258
|
+
|
259
|
+
httpd 8758 apache 6u IPv6 54937 0t0 TCP *:https (LISTEN)
|
260
|
+
|
261
|
+
httpd 8759 apache 4u IPv6 54928 0t0 TCP *:http (LISTEN)
|
262
|
+
|
263
|
+
httpd 8759 apache 6u IPv6 54937 0t0 TCP *:https (LISTEN)
|
264
|
+
|
265
|
+
httpd 8760 apache 4u IPv6 54928 0t0 TCP *:http (LISTEN)
|
266
|
+
|
267
|
+
httpd 8760 apache 6u IPv6 54937 0t0 TCP *:https (LISTEN)
|
268
|
+
|
269
|
+
httpd 8761 apache 4u IPv6 54928 0t0 TCP *:http (LISTEN)
|
270
|
+
|
271
|
+
httpd 8761 apache 6u IPv6 54937 0t0 TCP *:https (LISTEN)
|
272
|
+
|
273
|
+
httpd 8762 apache 4u IPv6 54928 0t0 TCP *:http (LISTEN)
|
274
|
+
|
275
|
+
httpd 8762 apache 6u IPv6 54937 0t0 TCP *:https (LISTEN)
|
276
|
+
|
277
|
+
httpd 8763 apache 4u IPv6 54928 0t0 TCP *:http (LISTEN)
|
278
|
+
|
279
|
+
httpd 8763 apache 6u IPv6 54937 0t0 TCP *:https (LISTEN)
|
280
|
+
|
281
|
+
httpd 8764 apache 4u IPv6 54928 0t0 TCP *:http (LISTEN)
|
282
|
+
|
283
|
+
httpd 8764 apache 6u IPv6 54937 0t0 TCP *:https (LISTEN)
|
284
|
+
|
285
|
+
httpd 8765 apache 4u IPv6 54928 0t0 TCP *:http (LISTEN)
|
286
|
+
|
287
|
+
httpd 8765 apache 6u IPv6 54937 0t0 TCP *:https (LISTEN)
|
288
|
+
|
289
|
+
httpd 8766 apache 4u IPv6 54928 0t0 TCP *:http (LISTEN)
|
290
|
+
|
291
|
+
httpd 8766 apache 6u IPv6 54937 0t0 TCP *:https (LISTEN)
|
292
|
+
|
293
|
+
httpd 8767 apache 4u IPv6 54928 0t0 TCP *:http (LISTEN)
|
294
|
+
|
295
|
+
httpd 8767 apache 6u IPv6 54937 0t0 TCP *:https (LISTEN)
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
```
|
1
情報追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -35,3 +35,205 @@
|
|
35
35
|
|
36
36
|
|
37
37
|
毎度killしなくても普通にrestartできるようにしたいのですが、やり方等ご教示頂けませんでしょうか。
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
---------------------------------------------------------
|
42
|
+
|
43
|
+
追記:
|
44
|
+
|
45
|
+
ご依頼を受けましたので、httpdの起動スクリプトを記載致します。
|
46
|
+
|
47
|
+
長くなってしまいますがご了承ください。
|
48
|
+
|
49
|
+
コメントアウト箇所は省略しております。
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
```ここに言語を入力
|
54
|
+
|
55
|
+
. /etc/rc.d/init.d/functions
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
if [ -f /etc/sysconfig/httpd ]; then
|
60
|
+
|
61
|
+
. /etc/sysconfig/httpd
|
62
|
+
|
63
|
+
fi
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
HTTPD_LANG=${HTTPD_LANG-"C"}
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
INITLOG_ARGS=""
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
apachectl=/usr/sbin/apachectl
|
76
|
+
|
77
|
+
httpd=${HTTPD-/usr/sbin/httpd}
|
78
|
+
|
79
|
+
prog=httpd
|
80
|
+
|
81
|
+
pidfile=${PIDFILE-/var/run/httpd/httpd.pid}
|
82
|
+
|
83
|
+
lockfile=${LOCKFILE-/var/lock/subsys/httpd}
|
84
|
+
|
85
|
+
RETVAL=0
|
86
|
+
|
87
|
+
STOP_TIMEOUT=${STOP_TIMEOUT-10}
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
start() {
|
92
|
+
|
93
|
+
echo -n $"Starting $prog: "
|
94
|
+
|
95
|
+
LANG=$HTTPD_LANG daemon --pidfile=${pidfile} $httpd $OPTIONS
|
96
|
+
|
97
|
+
RETVAL=$?
|
98
|
+
|
99
|
+
echo
|
100
|
+
|
101
|
+
[ $RETVAL = 0 ] && touch ${lockfile}
|
102
|
+
|
103
|
+
return $RETVAL
|
104
|
+
|
105
|
+
}
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
stop() {
|
110
|
+
|
111
|
+
status -p ${pidfile} $httpd > /dev/null
|
112
|
+
|
113
|
+
if [[ $? = 0 ]]; then
|
114
|
+
|
115
|
+
echo -n $"Stopping $prog: "
|
116
|
+
|
117
|
+
killproc -p ${pidfile} -d ${STOP_TIMEOUT} $httpd
|
118
|
+
|
119
|
+
else
|
120
|
+
|
121
|
+
echo -n $"Stopping $prog: "
|
122
|
+
|
123
|
+
success
|
124
|
+
|
125
|
+
fi
|
126
|
+
|
127
|
+
RETVAL=$?
|
128
|
+
|
129
|
+
echo
|
130
|
+
|
131
|
+
[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
|
132
|
+
|
133
|
+
}
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
reload() {
|
138
|
+
|
139
|
+
echo -n $"Reloading $prog: "
|
140
|
+
|
141
|
+
if ! LANG=$HTTPD_LANG $httpd $OPTIONS -t >&/dev/null; then
|
142
|
+
|
143
|
+
RETVAL=6
|
144
|
+
|
145
|
+
echo $"not reloading due to configuration syntax error"
|
146
|
+
|
147
|
+
failure $"not reloading $httpd due to configuration syntax error"
|
148
|
+
|
149
|
+
else
|
150
|
+
|
151
|
+
# Force LSB behaviour from killproc
|
152
|
+
|
153
|
+
LSB=1 killproc -p ${pidfile} $httpd -HUP
|
154
|
+
|
155
|
+
RETVAL=$?
|
156
|
+
|
157
|
+
if [ $RETVAL -eq 7 ]; then
|
158
|
+
|
159
|
+
failure $"httpd shutdown"
|
160
|
+
|
161
|
+
fi
|
162
|
+
|
163
|
+
fi
|
164
|
+
|
165
|
+
echo
|
166
|
+
|
167
|
+
}
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
case "$1" in
|
172
|
+
|
173
|
+
start)
|
174
|
+
|
175
|
+
start
|
176
|
+
|
177
|
+
;;
|
178
|
+
|
179
|
+
stop)
|
180
|
+
|
181
|
+
stop
|
182
|
+
|
183
|
+
;;
|
184
|
+
|
185
|
+
status)
|
186
|
+
|
187
|
+
status -p ${pidfile} $httpd
|
188
|
+
|
189
|
+
RETVAL=$?
|
190
|
+
|
191
|
+
;;
|
192
|
+
|
193
|
+
restart)
|
194
|
+
|
195
|
+
stop
|
196
|
+
|
197
|
+
start
|
198
|
+
|
199
|
+
;;
|
200
|
+
|
201
|
+
condrestart|try-restart)
|
202
|
+
|
203
|
+
if status -p ${pidfile} $httpd >&/dev/null; then
|
204
|
+
|
205
|
+
stop
|
206
|
+
|
207
|
+
start
|
208
|
+
|
209
|
+
fi
|
210
|
+
|
211
|
+
;;
|
212
|
+
|
213
|
+
force-reload|reload)
|
214
|
+
|
215
|
+
reload
|
216
|
+
|
217
|
+
;;
|
218
|
+
|
219
|
+
graceful|help|configtest|fullstatus)
|
220
|
+
|
221
|
+
$apachectl $@
|
222
|
+
|
223
|
+
RETVAL=$?
|
224
|
+
|
225
|
+
;;
|
226
|
+
|
227
|
+
*)
|
228
|
+
|
229
|
+
echo $"Usage: $prog {start|stop|restart|condrestart|try-restart|force-reload|reload|status|fullstatus|graceful|help|configtest}"
|
230
|
+
|
231
|
+
RETVAL=2
|
232
|
+
|
233
|
+
esac
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
exit $RETVAL
|
238
|
+
|
239
|
+
```
|