Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pay
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
pay
Commits
1fdcf15d
Commit
1fdcf15d
authored
Jul 16, 2021
by
wanjilong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 修改daemon
parent
2a336f9e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
11 deletions
+4
-11
start_daemon.sh
deploy/start_env/start_daemon.sh
+1
-1
cli.php
public/cli.php
+3
-10
No files found.
deploy/start_env/start_daemon.sh
View file @
1fdcf15d
...
@@ -56,7 +56,7 @@ php api.go2yd.com/htdocs/Website/public/cli.php $2 $3
...
@@ -56,7 +56,7 @@ php api.go2yd.com/htdocs/Website/public/cli.php $2 $3
while
true
;
do
while
true
;
do
is_master_on
=
$(
pgrep
-fc
"
$2
"
)
is_master_on
=
$(
pgrep
-fc
"
$2
$1
master process
"
)
if
[[
${
is_master_on
}
-gt
0
]]
;
then
if
[[
${
is_master_on
}
-gt
0
]]
;
then
if
[[
!
-f
"
$start_done_file
"
]]
;
then
if
[[
!
-f
"
$start_done_file
"
]]
;
then
touch
${
start_done_file
}
touch
${
start_done_file
}
...
...
public/cli.php
View file @
1fdcf15d
...
@@ -7,8 +7,8 @@ ini_set("error_reporting",E_ALL);//显示所有错误
...
@@ -7,8 +7,8 @@ ini_set("error_reporting",E_ALL);//显示所有错误
* cli bootstrap:application/BootstrapCli.php ( 在cli.ini中配置
* cli bootstrap:application/BootstrapCli.php ( 在cli.ini中配置
* 默认模块:modules/cli
* 默认模块:modules/cli
* 脚本位置:modules/cli/controllers/xxx.php
* 脚本位置:modules/cli/controllers/xxx.php
* 调用方式:php cli.php
controller action "a=1&b=2"
* 调用方式:php cli.php
Wallet 2 sync_wallet
*
测试脚本:php cli.php test index "a=1&b=2"
*
*/
*/
if
(
!
substr
(
php_sapi_name
(),
0
,
3
)
==
'cli'
)
{
if
(
!
substr
(
php_sapi_name
(),
0
,
3
)
==
'cli'
)
{
die
;
die
;
...
@@ -25,7 +25,7 @@ $application = new Yaf\Application( ROOT_PATH . "/conf/cli.ini");
...
@@ -25,7 +25,7 @@ $application = new Yaf\Application( ROOT_PATH . "/conf/cli.ini");
/**
/**
* 获取模块/控制器/方法
* 获取模块/控制器/方法
usage: php cli.php "t=Wallet&n=2&j=sync_wallet"
usage: php cli.php "t=Wallet&n=2&j=sync_wallet"
usage: php cli.php Wallet
sync_wallet 2
usage: php cli.php Wallet
2 sync_wallet
*
*
*/
*/
$module
=
"cli"
;
$module
=
"cli"
;
...
@@ -35,15 +35,8 @@ $method = "run";
...
@@ -35,15 +35,8 @@ $method = "run";
$param
=
[];
$param
=
[];
$param
[
't'
]
=
$argv
[
1
]
??
"Wallet"
;
$param
[
't'
]
=
$argv
[
1
]
??
"Wallet"
;
$param
[
'n'
]
=
$argv
[
2
]
??
2
;
$param
[
'n'
]
=
$argv
[
2
]
??
2
;
$param
[
'j'
]
=
$argv
[
3
]
??
"sync_wallet"
;
$_SERVER
[
'SERVER_NAME'
]
=
'daemon.pay'
;
$_SERVER
[
'SERVER_NAME'
]
=
'daemon.pay'
;
$_SERVER
[
'REMOTE_ADDR'
]
=
'127.0.0.1'
;
$_SERVER
[
'REMOTE_ADDR'
]
=
'127.0.0.1'
;
/*
if (!empty($argv[3]))
{
parse_str($argv[3], $param);
}
*/
$application
->
bootstrap
()
->
getDispatcher
()
->
dispatch
(
new
Yaf\Request\Simple
(
""
,
$module
,
$controller
,
$method
,
$param
)
);
$application
->
bootstrap
()
->
getDispatcher
()
->
dispatch
(
new
Yaf\Request\Simple
(
""
,
$module
,
$controller
,
$method
,
$param
)
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment