Skip to content

Instantly share code, notes, and snippets.

@lottspot
lottspot / btsync-init
Last active December 28, 2015 01:59
A simple init script for BitTorrent Sync. Written and tested on CentOS 6.
#!/bin/bash
BIN='/usr/local/bin/btsync'
CONF='/usr/local/etc/btsync/sync.conf'
PID='/var/run/btsync/btsync.pid'
PIDMATCH=true
SERVICE=$(basename $0)
test $(id -u) -ne 0 && echo "This is for root." >&2 && exit 1
main(){
@mendelgusmao
mendelgusmao / btsync
Last active March 4, 2021 15:37
init.d script for btsync (based on another script built to run dropbox)
#!/bin/sh
### BEGIN INIT INFO
# Provides: btsync
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Multi-user daemonized version of btsync.