bugfix
This commit is contained in:
parent
fde9e893e0
commit
80387c1425
17
install.sh
Normal file → Executable file
17
install.sh
Normal file → Executable file
@ -2,9 +2,9 @@ port=$1
|
||||
userid=$(id -un)
|
||||
groupid=$(id -gn)
|
||||
workdir=$(pwd)
|
||||
package=$(base $workdir)
|
||||
package=$(basename $workdir)
|
||||
|
||||
cat <<EOF
|
||||
cat <<EOF > $package.service
|
||||
[Unit]
|
||||
Wants=systemd-networkd.service
|
||||
|
||||
@ -21,24 +21,23 @@ SyslogIdentifier=$package
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF > $workdir/$package.service
|
||||
EOF
|
||||
|
||||
cat <<EOF
|
||||
|
||||
cat <<EOF
|
||||
cat <<EOF > $workdir/start.sh
|
||||
#!/usr/bin/bash
|
||||
|
||||
$workdir/$package.env/bin/python $workdir/app/$package.py -p $port
|
||||
EOF > $workdir/start.sh
|
||||
EOF
|
||||
|
||||
cat <<EOF
|
||||
cat <<EOF > $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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user