Skip to content

Commit 7ec17a2

Browse files
committed
fix bug for install server to linux (using start-stop-daemon)
1 parent b54afeb commit 7ec17a2

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ENDIF()
1313
ADD_SUBDIRECTORY(src)
1414
ADD_SUBDIRECTORY(dict)
1515

16-
if (!${APPLE})
16+
IF("${CMAKE_SYSTEM}" MATCHES "Linux")
1717
ADD_SUBDIRECTORY(script)
1818
ADD_SUBDIRECTORY(conf)
1919
endif()

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ make test
4141

4242
### 启动服务
4343

44+
因为服务的后台运行需要`start-stop-daemon`,在ubuntu下是自带的。但是在CentOS下就需要自己安装了。
45+
4446
```
4547
#Usage: /etc/init.d/cjserver {start|stop|restart|force-reload}
4648
#启动

script/cjserver

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ case "$1" in
2020
mkdir -p $RUNDIR
2121
touch $PIDFILE
2222
chmod 755 $RUNDIR
23-
if start-stop-daemon --start --quiet --umask 007 --pidfile $PIDFILE --exec /bin/bash -- -c "$DAEMON $DAEMON_ARGS >> $LOGFILE 2>&1"
23+
if start-stop-daemon --start --quiet --pidfile $PIDFILE --exec /bin/bash -- -c "$DAEMON $DAEMON_ARGS >> $LOGFILE 2>&1"
2424
then
2525
echo "$NAME."
2626
else

0 commit comments

Comments
 (0)