mirror of
https://github.com/PGYER/codefever.git
synced 2026-09-03 07:17:12 +08:00
fix(Webhook): fix service cannot start
This commit is contained in:
@@ -28,7 +28,7 @@ class Codefever_schedule extends CI_Controller {
|
||||
}
|
||||
|
||||
if ($schedule[1] == 'backend') {
|
||||
$command = "/usr/local/php7/bin/php {$ciIndex} backend/{$schedule[2]}";
|
||||
$command = "/usr/local/php/bin/php {$ciIndex} backend/{$schedule[2]}";
|
||||
} else if ($schedule[1] == 'customize') {
|
||||
$command = $schedule[2];
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ class Logger {
|
||||
|
||||
static function Log(string $log = '', string $scope) {
|
||||
$path = self::getLogPath($scope);
|
||||
$log = '[' . date('Y-m-d H:i:s ms') . '] : ' . $log;
|
||||
$log = '[' . date('Y-m-d H:i:s ms') . '] : ' . $log . PHP_EOL;
|
||||
file_put_contents($path, $log, FILE_APPEND);
|
||||
return TRUE;
|
||||
}
|
||||
@@ -39,8 +39,7 @@ class Logger {
|
||||
implode(' ', [$request::parse()->method, $request::parse()->uri]),
|
||||
implode(' ', [substr($request::parse()->content, 0, 1024), '[First KB Only]']),
|
||||
'Response: ' . $statusCode . ' (' . $errorCode . ')',
|
||||
implode(' ', [substr($response, 0, 1024), ' [First KB Only]']),
|
||||
PHP_EOL
|
||||
implode(' ', [substr($response, 0, 1024), ' [First KB Only]'])
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -50,8 +49,7 @@ class Logger {
|
||||
'Time Point: From ' . $startTime . ' To ' . microtime(),
|
||||
'ID: ' . $event->id,
|
||||
'Handler: ' . implode('|', $handler),
|
||||
implode(' ', [substr($event->getContent(), 0, 1024), ' [First KB Only]']),
|
||||
PHP_EOL
|
||||
implode(' ', [substr($event->getContent(), 0, 1024), ' [First KB Only]'])
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ swapon /root/swap
|
||||
|
||||
```shell
|
||||
# 安装基础软件包
|
||||
yum install -y sudo tcl tk gettext autoconf gcc cmake3 wget initscripts openssh-server pcre pcre-devel libcurl libcurl-devel libxml2 libxml2-devel openssl openssl-devel sqlite sqlite-devel libpng libpng-devel libwebp libwebp-devel libjpeg libjpeg-devel libXpm libXpm-devel freetype freetype-devel oniguruma oniguruma-devel libyaml libyaml-devel
|
||||
yum install -y sudo tcl tk gettext autoconf gcc cmake3 wget initscripts openssh-server crontabs pcre pcre-devel libcurl libcurl-devel libxml2 libxml2-devel openssl openssl-devel sqlite sqlite-devel libpng libpng-devel libwebp libwebp-devel libjpeg libjpeg-devel libXpm libXpm-devel freetype freetype-devel oniguruma oniguruma-devel libyaml libyaml-devel
|
||||
```
|
||||
|
||||
除此之外,你还需要安装 `libzip 1.7+` 库,需要去官网下载源码包解压后安装。
|
||||
@@ -237,6 +237,7 @@ chkconfig mariadb on # 或 chkconfig mysql on (根据安装的数据库类型,
|
||||
chkconfig nginx on
|
||||
chkconfig php-fpm on
|
||||
chkconfig codefever on
|
||||
chkconfig crond on
|
||||
```
|
||||
|
||||
尝试访问 `http://127.0.0.1` 或 `http://<server ip>` 来登录
|
||||
|
||||
@@ -61,6 +61,7 @@ echo 'Composer libraries loaded!'
|
||||
service codefever start
|
||||
service php-fpm start
|
||||
service nginx start
|
||||
service crond start
|
||||
|
||||
echo 'Services Started!'
|
||||
|
||||
|
||||
@@ -10,6 +10,9 @@ service codefever stop
|
||||
service php-fpm stop
|
||||
service nginx stop
|
||||
|
||||
yum install -y crontabs
|
||||
service crond stop
|
||||
|
||||
echo 'service stopped!'
|
||||
|
||||
cp nginx.conf-template /usr/local/nginx/conf/nginx.conf
|
||||
@@ -39,6 +42,7 @@ echo 'Composer libraries loaded!'
|
||||
service codefever start
|
||||
service php-fpm start
|
||||
service nginx start
|
||||
service crond start
|
||||
|
||||
echo 'services started!'
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ const data = {
|
||||
protected: '保护',
|
||||
operating: '操作',
|
||||
approve: '评审',
|
||||
enable: '恢复',
|
||||
enable: '启用',
|
||||
disable: '禁用',
|
||||
|
||||
last: '最近',
|
||||
|
||||
Reference in New Issue
Block a user