From 74cb135c6cc0225c35c12b602c65accc9b35b24b Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Fri, 27 Dec 2024 16:26:00 -0800 Subject: [PATCH] Update install.sh enhance embedded --- install.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 1c9a19b..b0031c9 100755 --- a/install.sh +++ b/install.sh @@ -68,9 +68,15 @@ sudo usermod -a -G tty $USER sudo usermod -a -G bluetooth $USER # copy service files -cp etc/pong_bot.tmp etc/pong_bot.service -cp etc/mesh_bot.tmp etc/mesh_bot.service -cp etc/mesh_bot_reporting.tmp etc/mesh_bot_reporting.service +if ! cp etc/pong_bot.tmp etc/pong_bot.service; then + sudo cp etc/pong_bot.tmp etc/pong_bot.service +fi +if ! cp etc/mesh_bot.tmp etc/mesh_bot.service; then + sudo cp etc/mesh_bot.tmp etc/mesh_bot.service +fi +if ! cp etc/mesh_bot_reporting.tmp etc/mesh_bot_reporting.service; then + sudo cp etc/mesh_bot_reporting.tmp etc/mesh_bot_reporting.service +fi # generate config file, check if it exists if [ -f config.ini ]; then