#!/usr/bin/bash # py-kms installer from git repository # V 0.2 26.05.20 arnaud@loumy.ch FOLDER_INSTALL='/usr/local/bin/py-kms' FOLDER_LOG='/var/log/py-kms' sudo apt update sudo apt install python3-tk python3-pip -y sudo pip3 install tzlocal pysqlite3 sudo mkdir $FOLDER_INSTALL sudo mkdir $FOLDER_LOG sudo git clone https://github.com/SystemRage/py-kms.git $FOLDER_INSTALL/ sudo mv $FOLDER_INSTALL/ $FOLDER_INSTALL.ori/ sudo mv $FOLDER_INSTALL.ori/py-kms/ $FOLDER_INSTALL/ sudo rm -r $FOLDER_INSTALL.ori/ sudo touch $FOLDER_LOG/server.log sudo chown $USER $FOLDER_LOG/server.log sudo touch /etc/systemd/system/py-kms.service sudo echo "[Unit] Description=py-kms service After=network.target StartLimitIntervalSec=0 [Service] Type=simple Restart=always RestartSec=1 User=$USER ExecStart=python3 $FOLDER_INSTALL/pykms_Server.py -V INFO -F $FOLDER_LOG/server.log [Install] WantedBy=multi-user.target" > /etc/systemd/system/py-kms.service sudo systemctl enable py-kms sudo systemctl start py-kms sudo systemctl status py-kms