Update easyinstall.sh script

This commit is contained in:
Daniel Markstedt 2021-09-19 17:11:38 -07:00
parent 133372ff09
commit 54219f66d4

View File

@ -397,20 +397,19 @@ function setupWirelessNetworking() {
}
function reserveScsiIds() {
if [ ! -f /etc/systemd/system/rascsi-web.service ]; then
echo "This feature depends on the RaSCSI Web UI being installed. Please install RaSCSI Web before continuing."
exit
fi
sudo systemctl stop rascsi-web
sudo systemctl stop rascsi
echo "WARNING: This will override any existing modifications to rascsi.service!"
echo "Please type the SCSI ID(s) that you want to reserve and press Enter:"
echo "The input should be a string of digits without separators, e.g. \"017\" for IDs 0, 1, and 7."
echo "The input should be numbers between 0 and 7 separated by commas, e.g. \"0,1,7\" for IDs 0, 1, and 7."
read -r RESERVED_IDS
sudo sed -i /^ExecStart=/d /etc/systemd/system/rascsi-web.service
sudo sed -i "8 i ExecStart=/home/pi/RASCSI/src/web/start.sh --reserved_ids=$RESERVED_IDS" /etc/systemd/system/rascsi-web.service
sudo sed -i /^ExecStart=/d /etc/systemd/system/rascsi.service
sudo sed -i "8 i ExecStart=/usr/local/bin/rascsi -r $RESERVED_IDS" /etc/systemd/system/rascsi.service
echo "Modified /etc/systemd/system/rascsi.service"
sudo systemctl daemon-reload
sudo systemctl start rascsi-web
sudo systemctl start rascsi
}
function runChoice() {