various fixes
This commit is contained in:
15
install.sh
15
install.sh
@@ -28,10 +28,9 @@ print_logo
|
||||
cd ~
|
||||
sudo -v
|
||||
|
||||
# Keep sudo session alive for the duration of the script
|
||||
( while true; do sudo -v; sleep 60; done ) &
|
||||
SUDO_KEEPALIVE_PID=$!
|
||||
trap "kill $SUDO_KEEPALIVE_PID" EXIT
|
||||
# Extend sudo timeout for the duration of the install, clean up on exit
|
||||
echo "Defaults timestamp_timeout=120" | sudo tee /etc/sudoers.d/99-hampack-install > /dev/null
|
||||
trap "sudo rm -f /etc/sudoers.d/99-hampack-install" EXIT
|
||||
|
||||
if ! command -v git &> /dev/null; then
|
||||
echo "Installing git..."
|
||||
@@ -47,11 +46,11 @@ fi
|
||||
|
||||
echo "Getting the latest version of HamPackServer..."
|
||||
rm -rf ~/.local/share/HamPackServer
|
||||
git clone https://gitea.young.computer/david/HamPackServer.git $HOME/.local/share/HamPackServer > /dev/null
|
||||
git clone https://gitea.young.computer/david/HamPackServer.git "$HOME/.local/share/HamPackServer" > /dev/null
|
||||
|
||||
mkdir -p $HOME/.local/bin
|
||||
cp $HOME/.local/share/HamPackServer/hampackserverrefresh $HOME/.local/bin/hampackserverrefresh
|
||||
cp $HOME/.local/share/HamPackServer/hampackserverupdate $HOME/.local/bin/hampackserverupdate
|
||||
mkdir -p "$HOME/.local/bin"
|
||||
cp "$HOME/.local/share/HamPackServer/hampackserverrefresh" "$HOME/.local/bin/hampackserverrefresh"
|
||||
cp "$HOME/.local/share/HamPackServer/hampackserverupdate" "$HOME/.local/bin/hampackserverupdate"
|
||||
|
||||
cd ~/.local/share/HamPackServer
|
||||
|
||||
|
||||
Reference in New Issue
Block a user