This repository has been archived on 2022-03-25. You can view files and clone it, but cannot push or open issues or pull requests.
manjaroConfiguration/installSyncthing.sh

25 lines
1,016 B
Bash
Raw Normal View History

2022-02-15 09:26:55 +01:00
#!/usr/bin/env bash
2021-11-14 00:44:24 +01:00
# We add the official deposit of Syncthing
2021-12-28 17:05:59 +01:00
which curl &> /dev/null || sudo apt update && sudo apt install curl -y # install curl if not already installed
2021-11-08 20:11:56 +01:00
sudo curl -s -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg
echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
2021-12-28 17:05:59 +01:00
2021-11-14 00:44:24 +01:00
# Install Syncthing
2021-11-08 20:11:56 +01:00
sudo apt update
sudo apt install syncthing -y
echo -e "\nSyncthing installed!"
2021-11-14 00:44:24 +01:00
# Launch it at startup
2022-02-15 09:26:55 +01:00
sudo systemctl enable syncthing@"$USER".service
sudo systemctl start syncthing@"$USER".service
# We remove the Ubuntu desktop shortcut only if it already exists
if [ -f /usr/share/applications/syncthing-start.desktop ]
2021-12-28 16:36:33 +01:00
then
sudo mv /usr/share/applications/syncthing-start.desktop /usr/share/applications/syncthing-start.desktop.bak
echo -e "\nSyncthing Start-icon removed!"
2021-12-28 16:36:33 +01:00
fi
echo -e "\nSyncthing configured to start at startup! 🎉"