#10 Updating makefile to include sudo
Some checks failed
DRB Build Tests / drb_build_and_test (push) Has been cancelled
Some checks failed
DRB Build Tests / drb_build_and_test (push) Has been cancelled
This commit is contained in:
@@ -23,27 +23,27 @@ pre_flight_checks:
|
|||||||
|
|
||||||
install_dependencies:
|
install_dependencies:
|
||||||
# Install necessary dependencies
|
# Install necessary dependencies
|
||||||
apt update
|
sudo apt update
|
||||||
apt upgrade -y
|
sudo apt upgrade -y
|
||||||
apt install -y nodejs portaudio19-dev libportaudio2 libpulse-dev pulseaudio apulse git ffmpeg git python3 python3-pip
|
sudo apt install -y nodejs portaudio19-dev libportaudio2 libpulse-dev pulseaudio apulse git ffmpeg git python3 python3-pip
|
||||||
|
|
||||||
setup_pulse_audio:
|
setup_pulse_audio:
|
||||||
# Setup Pulse Audio
|
# Setup Pulse Audio
|
||||||
systemctl --global disable pulseaudio.service pulseaudio.socket
|
sudo systemctl --global disable pulseaudio.service pulseaudio.socket
|
||||||
sed -i 's/autospawn = .*$/autospawn = no/' /etc/pulse/client.conf
|
sudo sed -i 's/autospawn = .*$/autospawn = no/' /etc/pulse/client.conf
|
||||||
echo "[Unit]" > /etc/systemd/system/PulseAudio.service
|
sudo echo "[Unit]" > /etc/systemd/system/PulseAudio.service
|
||||||
echo "Description=PulseAudio system server" >> /etc/systemd/system/PulseAudio.service
|
sudo echo "Description=PulseAudio system server" >> /etc/systemd/system/PulseAudio.service
|
||||||
echo "" >> /etc/systemd/system/PulseAudio.service
|
sudo echo "" >> /etc/systemd/system/PulseAudio.service
|
||||||
echo "[Service]" >> /etc/systemd/system/PulseAudio.service
|
sudo echo "[Service]" >> /etc/systemd/system/PulseAudio.service
|
||||||
echo "Type=notify" >> /etc/systemd/system/PulseAudio.service
|
sudo echo "Type=notify" >> /etc/systemd/system/PulseAudio.service
|
||||||
echo "ExecStart=pulseaudio --daemonize=no --system --realtime --log-target=journal" >> /etc/systemd/system/PulseAudio.service
|
sudo echo "ExecStart=pulseaudio --daemonize=no --system --realtime --log-target=journal" >> /etc/systemd/system/PulseAudio.service
|
||||||
echo "" >> /etc/systemd/system/PulseAudio.service
|
sudo echo "" >> /etc/systemd/system/PulseAudio.service
|
||||||
echo "[Install]" >> /etc/systemd/system/PulseAudio.service
|
sudo echo "[Install]" >> /etc/systemd/system/PulseAudio.service
|
||||||
echo "WantedBy=multi-user.target" >> /etc/systemd/system/PulseAudio.service
|
sudo echo "WantedBy=multi-user.target" >> /etc/systemd/system/PulseAudio.service
|
||||||
usermod -aG pulse-access root
|
sudo usermod -aG pulse-access root
|
||||||
usermod -aG pulse-access pi
|
sudo usermod -aG pulse-access pi
|
||||||
systemctl enable PulseAudio.service
|
sudo systemctl enable PulseAudio.service
|
||||||
systemctl stop PulseAudio.service
|
sudo systemctl stop PulseAudio.service
|
||||||
|
|
||||||
install_node:
|
install_node:
|
||||||
# Install Node Repo
|
# Install Node Repo
|
||||||
@@ -98,16 +98,16 @@ install_op25:
|
|||||||
# Clone OP25 from the git repository
|
# Clone OP25 from the git repository
|
||||||
git clone -b gr310 https://github.com/boatbod/op25.git $(OP25_DIR)
|
git clone -b gr310 https://github.com/boatbod/op25.git $(OP25_DIR)
|
||||||
# Edit the startup script to use the active.cfg.json config file generated by the app
|
# Edit the startup script to use the active.cfg.json config file generated by the app
|
||||||
sed -i 's/p25_rtl_example.json/active.cfg.json/g' $(OP25_DIR)/op25-multi_rx.sh
|
sudo sed -i 's/p25_rtl_example.json/active.cfg.json/g' $(OP25_DIR)/op25-multi_rx.sh
|
||||||
# Move the startup script to the apps dir
|
# Move the startup script to the apps dir
|
||||||
mv $(OP25_DIR)/op25-multi_rx.sh $(OP25_DIR)/op25/gr-op25_repeater/apps/
|
sudo mv $(OP25_DIR)/op25-multi_rx.sh $(OP25_DIR)/op25/gr-op25_repeater/apps/
|
||||||
# Install OP25 using the provided installation script
|
# Install OP25 using the provided installation script
|
||||||
bash $(OP25_DIR)/install.sh
|
sudo bash $(OP25_DIR)/install.sh
|
||||||
|
|
||||||
set_permissions:
|
set_permissions:
|
||||||
# Setting permissions on the directories created
|
# Setting permissions on the directories created
|
||||||
chown -R 1000:1000 ./*
|
sudo chown -R 1000:1000 ./*
|
||||||
chown 1000:1000 .env
|
sudo chown 1000:1000 .env
|
||||||
|
|
||||||
reboot:
|
reboot:
|
||||||
# Prompt the user for reboot confirmation
|
# Prompt the user for reboot confirmation
|
||||||
@@ -117,7 +117,7 @@ reboot:
|
|||||||
# Prompt user to press any key before rebooting
|
# Prompt user to press any key before rebooting
|
||||||
read -rsp $$'System will now reboot, press any key to continue or Ctrl+C to cancel...\n' -n1 key; \
|
read -rsp $$'System will now reboot, press any key to continue or Ctrl+C to cancel...\n' -n1 key; \
|
||||||
echo "Rebooting..."; \
|
echo "Rebooting..."; \
|
||||||
reboot; \
|
sudo reboot; \
|
||||||
else \
|
else \
|
||||||
echo "Please restart your device to complete the installation"; \
|
echo "Please restart your device to complete the installation"; \
|
||||||
fi
|
fi
|
||||||
Reference in New Issue
Block a user