mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
fix bug for install server to linux (using start-stop-daemon)
This commit is contained in:
parent
b54afeb5a3
commit
7ec17a2cd6
@ -13,7 +13,7 @@ ENDIF()
|
||||
ADD_SUBDIRECTORY(src)
|
||||
ADD_SUBDIRECTORY(dict)
|
||||
|
||||
if (!${APPLE})
|
||||
IF("${CMAKE_SYSTEM}" MATCHES "Linux")
|
||||
ADD_SUBDIRECTORY(script)
|
||||
ADD_SUBDIRECTORY(conf)
|
||||
endif()
|
||||
|
@ -41,6 +41,8 @@ make test
|
||||
|
||||
### 启动服务
|
||||
|
||||
因为服务的后台运行需要`start-stop-daemon`,在ubuntu下是自带的。但是在CentOS下就需要自己安装了。
|
||||
|
||||
```
|
||||
#Usage: /etc/init.d/cjserver {start|stop|restart|force-reload}
|
||||
#启动
|
||||
|
@ -20,7 +20,7 @@ case "$1" in
|
||||
mkdir -p $RUNDIR
|
||||
touch $PIDFILE
|
||||
chmod 755 $RUNDIR
|
||||
if start-stop-daemon --start --quiet --umask 007 --pidfile $PIDFILE --exec /bin/bash -- -c "$DAEMON $DAEMON_ARGS >> $LOGFILE 2>&1"
|
||||
if start-stop-daemon --start --quiet --pidfile $PIDFILE --exec /bin/bash -- -c "$DAEMON $DAEMON_ARGS >> $LOGFILE 2>&1"
|
||||
then
|
||||
echo "$NAME."
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user