#!/bin/bash

SCRIPT_PATH="$(readlink -f "$0")"

echo "Move manless binary files"
cd ~/Programs/nba-embedded/
mv manless_1.26.3 manless

echo "Move frontend binary files"
cd ~/Programs/nba-frontend/
mv nba-frontend-update nba-frontend

echo "Move start.sh and update.sh"
mv start_update.sh start.sh
mv update_update.sh update.sh

echo "Restart manless service and frontend service"
sudo systemctl restart frontend.service
sleep 10000
systemctl --user restart manless

rm -- "$SCRIPT_PATH"
