File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change
1
+ * .log
2
+ * .pid
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ usage () {
16
16
usage: ./$NAME <command> [<hostname>:<port>]
17
17
18
18
Available commands:
19
+
19
20
start Starts PHP built-in web server server on specified hostname:port, default is localhost:$PORT
20
21
stop Stops the PHP built-in web server
21
22
restart Stops and Starts on previously specified hostname:port
@@ -113,12 +114,12 @@ start_server () {
113
114
read_pidfile () {
114
115
if [[ -e " $PIDFILE " ]]; then
115
116
PIDFILECONTENT=` cat " $PIDFILE " `
116
- IFS=: read HOST PORT PID <<< " $PIDFILECONTENT:"
117
+ IFS=: read HOST PORT PID <<< " $PIDFILECONTENT:"
117
118
return 0
118
119
else
119
120
return 1
120
121
fi
121
-
122
+
122
123
}
123
124
stop_server () {
124
125
if read_pidfile; then
@@ -134,7 +135,7 @@ stop_server () {
134
135
135
136
status_server () {
136
137
if read_pidfile && kill -0 " $PID " ; then
137
- printf " ${BLUE} " $NAME " is running... ${NORMAL} \n"
138
+ printf " ${BLUE} " $NAME " is running on ${HOST} : ${PORT} ${NORMAL} \n"
138
139
else
139
140
printf " ${YELLOW} " $NAME " is not running!${NORMAL} \n"
140
141
fi
You can’t perform that action at this time.
0 commit comments