Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 41 lines (32 sloc) 1.081 kb
a2af2ed0 »
2005-03-24 Initial revision
1 #!/bin/sh
ac42f23d »
2011-03-31 don't use lftp.script, this way we can put the password in the config…
2 #$RedRiver: regen.sh,v 1.10 2010/03/08 20:19:37 andrew Exp $
a2af2ed0 »
2005-03-24 Initial revision
3
f90e27d4 »
2005-04-06 changed to use config from /etc/OpenBSDTorrents.conf
4 . /etc/OpenBSDTorrents.conf
5fc2949a »
2005-03-28 lots of changes. mostly just made it work now
5
f90e27d4 »
2005-04-06 changed to use config from /etc/OpenBSDTorrents.conf
6 cd ${OBT_DIR_HOME}
7ffdc04f »
2005-05-02 make it only run once
7 PIDFILE=${OBT_DIR_HOME}/run/regen.pid
8
9 if [ -e ${PIDFILE} ]; then
10 PID=`head -1 ${PIDFILE}`
11 kill -0 ${PID} 2> /dev/null
12 if [ $? -eq 0 ]; then
d3c9fc81 »
2010-03-03 note what is Already running for less confusion
13 echo $0 Already running
7ffdc04f »
2005-05-02 make it only run once
14 exit 1
15 fi
16 fi
17 echo $$ > ${PIDFILE}
5fc2949a »
2005-03-28 lots of changes. mostly just made it work now
18
19 if [[ $1 != skip ]]; then
87691d9b »
2010-03-08 more spacing for readability of output
20 echo
f90e27d4 »
2005-04-06 changed to use config from /etc/OpenBSDTorrents.conf
21 echo ${OBT_DIR_HOME}/MakeTorrents.pl $*
22 ${OBT_DIR_HOME}/MakeTorrents.pl $*
5fc2949a »
2005-03-28 lots of changes. mostly just made it work now
23 fi
24
87691d9b »
2010-03-08 more spacing for readability of output
25 echo
f90e27d4 »
2005-04-06 changed to use config from /etc/OpenBSDTorrents.conf
26 echo ${OBT_DIR_HOME}/CurrentTorrents.pl
27 ${OBT_DIR_HOME}/CurrentTorrents.pl
5fc2949a »
2005-03-28 lots of changes. mostly just made it work now
28
4bb98aea »
2012-10-13 Sync the opentracker whitelist
29 echo "Update /var/opentracker/whitelist";
30 cat ${OBT_DIR_TORRENT}/allowed.txt > /var/opentracker/whitelist
31 # torrentsync ALL=(_opentracker) NOPASSWD:/usr/bin/pkill -HUP opentracker
32 sudo -u _opentracker /usr/bin/pkill -HUP opentracker
33
78876b73 »
2012-10-14 Don't reload the torrents every time, they usually don't change
34 echo "Reload web server"
35 # torrentsync ALL=(root) NOPASSWD: /usr/local/bin/hypnotoad /home/OpenBSDTorrents/OpenBSDtracker
36 sudo /usr/local/bin/hypnotoad /home/OpenBSDTorrents/OpenBSDtracker
37
87691d9b »
2010-03-08 more spacing for readability of output
38 echo
4508123d »
2012-10-13 Make it a bit more generic so "anyone" can seed torrents
39 echo ${OBT_DIR_HOME}/SeedTorrents.pl
2b412892 »
2012-09-08 We no longer use the cur_torrents dir or seed from there
40 ${OBT_DIR_HOME}/SeedTorrents.pl
Something went wrong with that request. Please try again.