Skip to content

Instantly share code, notes, and snippets.

@samdbmg
Created February 28, 2017 15:09
Show Gist options
  • Save samdbmg/84f880fa623dfeabe5ad4006b7ca306b to your computer and use it in GitHub Desktop.
Save samdbmg/84f880fa623dfeabe5ad4006b7ca306b to your computer and use it in GitHub Desktop.
Script to run syncthing in a screen session, with a proxy set
#!/bin/bash
if [ "$1" == "run" ];
then
while true
do
all_proxy=socks5://socks-gw:1080 /usr/bin/syncthing -no-browser -logfile=/tmp/syncthing.log
sleep 1
done
fi
screen -dmS syncthing ./$0 run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment