Skip to content

Commit

Permalink
don't overwrite exists config file.
Browse files Browse the repository at this point in the history
  • Loading branch information
YihaoPeng committed Aug 14, 2018
1 parent 2da96c1 commit 51e61b8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ target_link_libraries(btcagent-mu btccomagent ${THRID_LIBRARIES})
# make instal support
install(TARGETS btcagent-mu
DESTINATION /usr/bin)
install(FILES src/agent/agent_conf.json README.md README-zh_CN.md
install(FILES src/agent/agent_conf.default.json README.md README-zh_CN.md
DESTINATION /etc/btcagent-mu)
install(FILES install/btcagent-multi_user.conf
DESTINATION /etc/supervisor/conf.d)
Expand Down
9 changes: 8 additions & 1 deletion install/debian-control/postinst
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/bin/sh

echo "-- create log dir for btcagent (multi user version)"
mkdir /var/log/btcagent-mu
if ! [ -e /var/log/btcagent-mu ]; then
mkdir /var/log/btcagent-mu
fi

echo "-- copy configure files"
if ! [ -e /etc/btcagent-mu/agent_conf.json ]; then
cp /etc/btcagent-mu/agent_conf.default.json /etc/btcagent-mu/agent_conf.json
fi

echo "-- set minfds=65535 in supervisor.conf"
cat /etc/supervisor/supervisord.conf | grep -v 'minfds\s*=' | sed '/\[supervisord\]/a\minfds=65535' | tee /etc/supervisor/supervisord.conf | grep 'minfds\s*='
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"agent_listen_port": 3334,
"pools": [
["cn.ss.btc.com", 1800],
["cn.ss.btc.com", 443],
["cn.ss.btc.com", 3333]
["cn.ss.btc.com", 443],
["cn.ss.btc.com", 3333]
]
}

0 comments on commit 51e61b8

Please sign in to comment.