Commit 76add2aa authored by wei.xuan's avatar wei.xuan

fix:fix startup.sh

parent 826549c2
#!/bin/bash
CURDIR=$(cd $(dirname "$0");pwd)
CONF=$CURDIR/majora.ini
chmod +x majora
echo "$CURDIR"/majora -conf "$CONF"
exec "$CURDIR"/majora -conf "$CONF"
\ No newline at end of file
tunnel_addr = aoba.vip:5879
dns_server = 114.114.114.114:53
;bind to local ip
;local_ip = 192.168.0.100
;for performance pprof 0 is close
;pprof_port = 0
disable_update = false
; default is info
log_level = 0
reconn_interval = 5s
;client_id =
[extra]
account = superman
[redial]
;command = /bin/bash
;exec_path = /root/ppp_auto_with_auth.sh
;redial_duration = 5m
;wait_time = 10s
\ No newline at end of file
tunnel_addr = aoba.vip:5879
tunnel_addr = majora.virjar.com:5879
dns_server = 114.114.114.114:53
;bind to local ip
;local_ip = 192.168.0.100
......
#!/bin/bash
CURDIR=$(cd $(dirname "$0");pwd)
#!/usr/bin/env bash
CONF=$CURDIR/majora.ini
. /etc/profile
. /root/.bash_profile
chmod +x majora
echo "$CURDIR"/majora -conf "$CONF"
echo 'shutdown majora-cli server'
now_dir=`pwd`
exec "$CURDIR"/majora -conf "$CONF"
\ No newline at end of file
cd `dirname $0`
script_dir=`pwd`
function getPid(){
echo `ps -ef | grep "majora" | grep -v "grep" | grep -v "startup.sh" | awk '{print $2}'`
}
remote_pid=`getPid`
echo remote_pid:${remote_pid}
if [[ -n "${remote_pid}" ]] ;then
echo kill pid ${remote_pid}
kill -9 ${remote_pid}
fi
echo "start majora-cli server"
sleep 2
remote_pid=`getPid`
if [[ -n "${remote_pid}" ]] ;then
# 被supervisor自动守护
exit 0
fi
std_log=../log
if [[ ! -d ${std_log} ]] ;then
mkdir ${std_log}
fi
nohup bash exec.sh >> ${std_log} 2>&1 &
sleep 2
remote_pid=`getPid`
echo "remote pid:${remote_pid}"
\ No newline at end of file
......@@ -41,8 +41,7 @@ for os in $os_all; do
mkdir ${majora_path}
mv ./majora_${os}_${arch} ${majora_path}/majora
fi
cp -rf ../conf/majora.ini ${majora_path}
cp -rf ../conf/start.sh ${majora_path}
cp -rf ../conf/* ${majora_path}
# packages
cd ./packages
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment