Last active
August 29, 2015 14:12
-
-
Save icaruseffect/4c4fca1f1640f0d01693 to your computer and use it in GitHub Desktop.
install_syncthing_jolla.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#create folder for syncthing binary | |
mkdir -p /home/nemo/.bin/syncthing | |
#go to temporary files folder | |
cd /tmp | |
#Download Version 0.10.14 and install it to the dir in the home directory | |
curl -L "https://github.com/syncthing/syncthing/releases/download/v0.10.14/syncthing-linux-armv7-v0.10.14.tar.gz" | \ | |
tar xvz "syncthing-linux-armv7-v0.10.14/syncthing" | |
install -m 755 syncthing-linux-armv7-v0.10.14/syncthing /home/nemo/.bin/syncthing | |
rm -rf syncthing* | |
echo "create the dirs for systemd user mode when needed" | |
mkdir -p ~/.config/systemd/user/user-session.target.wants/ | |
echo "create the systemd file for syncthing autostart" | |
echo "creating file" | |
echo " Description=Syncthing | |
After=pre-user-session.target | |
[Service] | |
Environment=STNORESTART=yes | |
ExecStart=/home/nemo/.bin/syncthing | |
Restart=on-success | |
SuccessExitStatus=3 | |
[Install] | |
WantedBy=user-session.target" > /home/nemo/.config/systemd/user/user-session.target.wants/syncthing.service | |
echo "enable the syncthing service" | |
systemctl --user daemon-reload | |
systemctl --user start syncthing | |
echo "finished. Opening configuration interface in browser" | |
exec xdg-open "http://127.0.0.1:8080" | /var/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment