Added i2c-amp-control service

This commit is contained in:
2021-12-12 20:23:28 +01:00
parent 9f3e00f093
commit 3744142e49
7 changed files with 192 additions and 0 deletions

25
install.sh Normal file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
if [ "#{0:0:1}" = "/" ]; then
spath=$0
else
spath=$PWD/$(dirname "$0")
fi
execute_script()
{
SERVICE=$1
read -p "Install service $SERVICE? (yes/NO): " xcute
xcute="${xcute,,}" # To lowercase
if [[ "$xcute" = "y" || "$xcute" = "yes" ]]; then
echo "------------------------------------ Installing $SERVICE ------------------------------------"
cd "$spath/$SERVICE" || return
. ./install.sh
echo "------------------------------------ $SERVICE installed ------------------------------------"
else
echo "Skipping installation of $SERVICE"
fi
}
execute_script i2c-amp-control