From 59fbef29c0f5c94684cef042b7cdc1567a921d06 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 10 Jul 2024 17:22:19 -0700 Subject: [PATCH] Update install.sh --- install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 014b97c..1642dc1 100755 --- a/install.sh +++ b/install.sh @@ -36,11 +36,12 @@ read bot # reminder to change the .service file to proper path for the bot #set the correct path in the service file -program_path="$(dirname "$0")" +program_path=$(pwd) cp etc/pong_bot.tmp etc/pong_bot.service cp etc/mesh_bot.tmp etc/mesh_bot.service -sed -i "s|/dir/launch.sh|$program_path/launch.sh|g" etc/pong_bot.service -sed -i "s|/dir/launch.sh|$program_path/launch.sh|g" etc/mesh_bot.service +replace="s|/dir/launch.sh|$program_path/launch.sh|g" +sed -i $replace etc/pong_bot.service +sed -i $replace etc/mesh_bot.service if [ $bot == "pong" ]; then # install service for pong bot