py-kms/docker/docker-py2-kms/start.sh

53 lines
2.6 KiB
Bash
Raw Normal View History

2019-03-29 14:46:17 +01:00
#!/bin/bash
# EN: Start daemons
# RU: Запуск демонов
2019-09-13 10:35:38 +02:00
cd /home/py-kms
2019-03-29 14:46:17 +01:00
if [ "$SQLITE" == false ];
then
if [ "$EPID" == "" ];
then
2019-09-13 10:35:38 +02:00
if [ "$LOGSIZE" == "" ];
then
/usr/bin/python pykms_Server.py ${IP} ${PORT} -l ${LCID} -c ${CLIENT_COUNT} -a ${ACTIVATION_INTERVAL} -r ${RENEWAL_INTERVAL} -w ${HWID} -V ${LOGLEVEL} -F ${LOGFILE}
else
/usr/bin/python pykms_Server.py ${IP} ${PORT} -l ${LCID} -c ${CLIENT_COUNT} -a ${ACTIVATION_INTERVAL} -r ${RENEWAL_INTERVAL} -w ${HWID} -V ${LOGLEVEL} -F ${LOGFILE} -S ${LOGSIZE}
fi
2019-03-29 14:46:17 +01:00
else
2019-09-13 10:35:38 +02:00
if [ "$LOGSIZE" == "" ];
then
/usr/bin/python pykms_Server.py ${IP} ${PORT} -e ${EPID} -l ${LCID} -c ${CLIENT_COUNT} -a ${ACTIVATION_INTERVAL} -r ${RENEWAL_INTERVAL} -w ${HWID} -V ${LOGLEVEL} -F ${LOGFILE}
else
/usr/bin/python pykms_Server.py ${IP} ${PORT} -e ${EPID} -l ${LCID} -c ${CLIENT_COUNT} -a ${ACTIVATION_INTERVAL} -r ${RENEWAL_INTERVAL} -w ${HWID} -V ${LOGLEVEL} -F ${LOGFILE} -S ${LOGSIZE}
fi
2019-03-29 14:46:17 +01:00
fi
else
if [ "$EPID" == "" ];
then
2019-09-13 10:35:38 +02:00
if [ "$LOGSIZE" == "" ];
then
/bin/bash -c "/usr/bin/python pykms_Server.py ${IP} ${PORT} -l ${LCID} -c ${CLIENT_COUNT} -a ${ACTIVATION_INTERVAL} -r ${RENEWAL_INTERVAL} -s -w ${HWID} -V ${LOGLEVEL} -F ${LOGFILE} &"
sleep 5
2019-11-18 16:30:08 +01:00
/usr/bin/python pykms_Client.py ${IP} ${PORT} -m Windows7 &
2019-09-13 10:35:38 +02:00
/usr/bin/python /home/sqlite_web/sqlite_web.py -H ${IP} -x ${PWD}/clients.db
else
/bin/bash -c "/usr/bin/python pykms_Server.py ${IP} ${PORT} -l ${LCID} -c ${CLIENT_COUNT} -a ${ACTIVATION_INTERVAL} -r ${RENEWAL_INTERVAL} -s -w ${HWID} -V ${LOGLEVEL} -F ${LOGFILE} -S ${LOGSIZE} &"
sleep 5
2019-11-18 16:30:08 +01:00
/usr/bin/python pykms_Client.py ${IP} ${PORT} -m Windows7 &
2019-09-13 10:35:38 +02:00
/usr/bin/python /home/sqlite_web/sqlite_web.py -H ${IP} -x ${PWD}/clients.db
fi
2019-03-29 14:46:17 +01:00
else
2019-09-13 10:35:38 +02:00
if [ "$LOGSIZE" == "" ];
then
/bin/bash -c "/usr/bin/python pykms_Server.py ${IP} ${PORT} -e ${EPID} -l ${LCID} -c ${CLIENT_COUNT} -a ${ACTIVATION_INTERVAL} -r ${RENEWAL_INTERVAL} -s -w ${HWID} -V ${LOGLEVEL} -F ${LOGFILE} &"
2019-11-18 16:43:24 +01:00
sleep 5
2019-11-18 16:30:08 +01:00
/usr/bin/python pykms_Client.py ${IP} ${PORT} -m Windows7 &
2019-09-13 10:35:38 +02:00
/usr/bin/python /home/sqlite_web/sqlite_web.py -H ${IP} -x ${PWD}/clients.db
else
/bin/sh -c "/usr/bin/python pykms_Server.py ${IP} ${PORT} -e ${EPID} -l ${LCID} -c ${CLIENT_COUNT} -a ${ACTIVATION_INTERVAL} -r ${RENEWAL_INTERVAL} -s -w ${HWID} -V ${LOGLEVEL} -F ${LOGFILE} -S ${LOGSIZE} &"
sleep 5
2019-11-18 16:30:08 +01:00
/usr/bin/python pykms_Client.py ${IP} ${PORT} -m Windows7 &
2019-09-13 10:35:38 +02:00
/usr/bin/python /home/sqlite_web/sqlite_web.py -H ${IP} -x ${PWD}/clients.db
fi
2019-03-29 14:46:17 +01:00
fi
fi