lyadmin/perl-script/conf/lyctl.sh
2020-12-05 20:49:16 +00:00

28 lines
314 B
Bash

#!/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