From 80387c14257dc83c45d5b5cacaad10c8f5ad20e6 Mon Sep 17 00:00:00 2001 From: ymq1 Date: Sun, 22 Jun 2025 13:57:29 +0000 Subject: [PATCH] bugfix --- install.sh | 17 ++++++++--------- requirements.txt | 6 +++--- 2 files changed, 11 insertions(+), 12 deletions(-) mode change 100644 => 100755 install.sh diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 index b52879b..838594e --- a/install.sh +++ b/install.sh @@ -2,9 +2,9 @@ port=$1 userid=$(id -un) groupid=$(id -gn) workdir=$(pwd) -package=$(base $workdir) +package=$(basename $workdir) -cat < $package.service [Unit] Wants=systemd-networkd.service @@ -21,24 +21,23 @@ SyslogIdentifier=$package [Install] WantedBy=multi-user.target -EOF > $workdir/$package.service +EOF -cat < $workdir/start.sh #!/usr/bin/bash $workdir/$package.env/bin/python $workdir/app/$package.py -p $port -EOF > $workdir/start.sh +EOF -cat < $workdir/stop.sh #!/usr/bin/bash ps -ef|grep "$package.py"|grep -v grep|awk '{print("kill -9", $2)}'|sh -EOF > $workdir/stop.sh +EOF chmod +x $workdir/*.sh python3 -m venv $package.env +$package.env/bin/pip install setuptools wheel $package.env/bin/pip install -r requirements.txt sudo mkdir /var/log/$package sudo cp $package.service /etc/systemd/system diff --git a/requirements.txt b/requirements.txt index 07d7314..579081d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ fasttext -git+https://git.kaiyauncloud.cn/yumoqing/apppublic -git+https://git.kaiyauncloud.cn/yumoqing/sqlor -git+https://git.kaiyauncloud.cn/yumoqing/ahserver +git+https://git.kaiyuancloud.cn/yumoqing/apppublic +git+https://git.kaiyuancloud.cn/yumoqing/sqlor +git+https://git.kaiyuancloud.cn/yumoqing/ahserver