srchub-install

srchub-install Commit Details


Date:2015-10-31 21:47:04 (9 years 1 month ago)
Author:Natalie Adams
Branch:master
Commit:26e2550013b9a43956e94ac28000092afbaea61e
Parents: 62d84854aa2e764cd24058a8092241653619515e
Message:updating installer

Changes:

File differences

srchub-install.py
145145
146146
147147
148
149
150
151
152
153
154
148155
149156
150157
......
156163
157164
158165
159
160
161
162
163
164
165
166
167
168
169
166170
167171
168172
"""
CRON_JOB_SCRIPT = """
*/5 * * * * /bin/sh /home/www/indefero/scripts/SyncMercurial.sh
15 * * * * /usr/bin/php5 /home/www/indefero/scripts/calculateforgecron.php
0 1 * * * /usr/bin/php5 /home/www/indefero/scripts/activitycron.php
*/5 * * * * /usr/bin/php5 /home/www/indefero/scripts/queuecron.php
"""
d = Dialog(dialog="dialog", autowidgetsize=True)
distro = ""
answer = d.yesno("Do you want me to attempt to install the cron jobs?")
if answer == d.DIALOG_OK:
d.infobox("Setting up cron jobs...")
commands = []
commands.append("0 1 * * * %s" % ("/usr/bin/php5 /home/www/indefero/scripts/activitycron.php"))
commands.append("*/5 * * * * %s" % ("/bin/sh /home/www/indefero/scripts/SyncMercurial.sh"))
commands.append("15 * * * * /usr/bin/php5 /home/www/indefero/scripts/calculateforgecron.php")
commands.append("*/5 * * * * /usr/bin/php5 /home/www/indefero/scripts/queuecron.php")
for command in commands:
call(["(crontab -l; echo '%s') | crontab" % command])
with open('/tmp/cron', 'w') as content_file:
content_file.write(CRON_JOB_SCRIPT)
call("crontab -u www-data /tmp/cron".split(" "))
call(["rm /tmp/cron"])
def update_mercurial_hooks():
hgconf = ""

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.05211s using 14 queries.