Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Missed a couple spaces in my call() routines, broke my script.

  • Loading branch information...
commit 0810b8890958cfec3cd5a276c394955aa8cb29b1 1 parent 400880e
@mattdeboard authored
Showing with 6 additions and 5 deletions.
  1. +6 −5 srchupdate.py
View
11 srchupdate.py
@@ -14,17 +14,18 @@ def update():
datefmt='%m/%d/%Y %H:%M:%S')
logging.info('Starting index update.')
try:
- mattwhoosh = subprocess.call(['sudo', 'chown', 'matt:matt '+whoosh_dir])
- mattwhooshfiles = subprocess.call(['sudo', 'chown',
+ mattwhoosh = subprocess.call(['sudo', 'chown', '-R',
+ 'matt:matt '+whoosh_dir])
+ mattwhooshfiles = subprocess.call(['sudo', 'chown', '-R',
'matt:matt '+whoosh_dir+'*'])
update_index = subprocess.call([domain_dir+'bin/python',
appdir+'manage.py update_index'])
- apachewhsh = subprocess.call(['sudo', 'chown',
+ apachewhsh = subprocess.call(['sudo', 'chown', '-R',
'www-data:www-data '+whoosh_dir])
- apachewhsh2 = subprocess.call(['sudo', 'chown',
+ apachewhsh2 = subprocess.call(['sudo', 'chown', '-R',
'www-data:www-data '+whoosh_dir+'*'])
apachereload = subprocess.call(['sudo',
- '/etc/init.d/apache2 force-reload'])
+ '/etc/init.d/apache2', 'force-reload'])
if sum(mattwhoosh, mattwhooshfiles, update_index, apachewhsh,
apachewhsh2, apachereload) == 0:
logging.info('Index successfully updated.')
Please sign in to comment.
Something went wrong with that request. Please try again.