#!/bin/bash

# Переменные
SHARE_DIR='%SHARE_DIR%'

if [[ -f $SHARE_DIR/Veyon_config.json ]]; then
  rm -f $SHARE_DIR/Veyon_config.json
fi

if [[ -f $SHARE_DIR/Teacher_public_key.pem ]]; then
  rm -f $SHARE_DIR/Teacher_public_key.pem
fi

veyon-cli    authkeys    export    Teacher/public    $SHARE_DIR/Teacher_public_key.pem
veyon-cli    config    export    $SHARE_DIR/Veyon_config.json

chmod    644    $SHARE_DIR/Teacher_public_key.pem