mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-02 14:25:38 +08:00
update to build 407
change daemon command from system to Process::kill add master_pid for motd information add option --preview delete server_event_handler_class and use process go-cqhttp-down.sh script add arm64 support add ./zhamao support change build-runtime.sh to install-runtime.sh add option --disable-safe-exit adjust some Console output set start script using /bin/sh for supporting auto searching php and framework
This commit is contained in:
25
bin/start
25
bin/start
@@ -1,6 +1,23 @@
|
||||
#!/usr/bin/env php
|
||||
<?php /** @noinspection PhpIncludeInspection */
|
||||
#!/bin/sh
|
||||
|
||||
require_once ((!is_dir(__DIR__ . '/../vendor')) ? getcwd() : (__DIR__ . "/..")) . "/vendor/autoload.php";
|
||||
if [ -f "$(pwd)/runtime/php" ]; then
|
||||
executable="$(pwd)/runtime/php"
|
||||
echo "* Framework started with built-in php."
|
||||
else
|
||||
which php >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
executable=$(which php)
|
||||
else
|
||||
echo 'Cannot find any PHP runtime, please use command `./install-runtime.sh` or install PHP manually!'
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
(new ZM\ConsoleApplication("zhamao-framework"))->initEnv()->run();
|
||||
if [ -f "$(pwd)/src/entry.php" ]; then
|
||||
$executable "$(pwd)/src/entry.php" $@
|
||||
elif [ -f "$(pwd)/vendor/zhamao/framework/src/entry.php" ]; then
|
||||
$executable "$(pwd)/vendor/zhamao/framework/src/entry.php" $@
|
||||
else
|
||||
echo "Cannot find zhamao-framework entry file!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user