added start script

This commit is contained in:
gashapwn 2020-12-05 20:49:16 +00:00
parent d431398bd8
commit 4e3c70e280
2 changed files with 28 additions and 0 deletions

1
app.py Normal file → Executable file
View File

@ -1,3 +1,4 @@
#!/tilde/lyadmin/venv/bin/python3
import glob
import json

27
perl-script/conf/lyctl.sh Normal file
View File

@ -0,0 +1,27 @@
#!/bin/bash
ACMD="$1"
ARGV="$@"
. /tilde/lyadmin/venv/bin/activate
INSTDIR='/tilde/lyadmin'
LINGYIND="$INSTDIR/app.py"
ERROR=0
USAGESTR='Usage:) lyctl.sh start'
case $ACMD in
start)
cd $INSTDIR
$LINGYIND
$ERROR=$?
;;
*)
echo "no valid aguments..."
echo $USAGESTR
ERROR=2
esac
exit $ERROR