Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
website
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Ask
website
Commits
ee52a71d
Commit
ee52a71d
authored
Mar 23, 2013
by
Giuseppe Terrasi
Browse files
Options
Browse Files
Download
Plain Diff
parents
48f966c4
4303f48a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
3 deletions
+33
-3
cron/send_email_alerts
cron/send_email_alerts
+3
-3
cronjob
cronjob
+30
-0
No files found.
cron/send_email_alerts
View file @
ee52a71d
#!/bin/sh
#!/bin/sh
PYTHONPATH
=
/
path/to/dir_above_osqa_site
PYTHONPATH
=
/
srv/www/chiedi.ubuntu-it.org/www
export
PYTHONPATH
export
PYTHONPATH
PROJECT_ROOT
=
$PYTHONPATH
/osqa
_site
PROJECT_ROOT
=
$PYTHONPATH
/osqa
/
path/to
/python
$PROJECT_ROOT
/manage.py send_email_alerts
/
usr/bin
/python
$PROJECT_ROOT
/manage.py send_email_alerts
cronjob
0 → 100644
View file @
ee52a71d
WEB=/srv/chiedi.ubuntu-it.org
WWW=$WEB/www/osqa/
BZR=/srv/shared-branches/ubuntu-it-ask
BZRWWW=$BZR/ubuntu-it-ask/
function update_files {
##Copy of all files
cp -ax $BZRWWW/* $WWW/
}
############################################
## Test if repo has been updated ##
############################################
TMP_FILE=/tmp/wwwrepo_version ## Temp file where version bzr repo was saved
## Create temp file if it doesn't exist
if ! test -f $TMP_FILE ; then
cat /dev/null > $TMP_FILE
fi
cd $BZR
VERSION=`cat $TMP_FILE`
VERSION_TEST=`bzr up 2>&1 | tail -n1 `
if [ ! "$VERSION_TEST" = "$VERSION" ] ; then
echo "$VERSION_TEST" > $TMP_FILE
update_files
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment