Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Poduptime
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
diasporg
Poduptime
Commits
ef256991
Commit
ef256991
authored
Nov 13, 2013
by
dmorley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add and label config
parent
dba36d36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
12 deletions
+25
-12
db/config.php.example
db/config.php.example
+11
-2
db/pull.sh
db/pull.sh
+14
-10
No files found.
db/config.php.example
View file @
ef256991
<?php
<?php
/* Copyright (c) 2011, David Morley. This file is licensed under the Affero General Public License version 3 or later. See the COPYRIGHT file. */
/* Copyright (c) 2011, David Morley. This file is licensed under the Affero General Public License version 3 or later. See the COPYRIGHT file. */
//backup directory
$backup_dir
=
"/var/www/podup/backup"
;
//location of pg dump
$pg_dump_dir
=
"/usr/bin"
;
//db username
$pguser
=
''
;
$pguser
=
''
;
//db password
$pgpass
=
''
;
$pgpass
=
''
;
//db name
$pgdb
=
''
;
$pgdb
=
''
;
$geouser
=
''
;
//admin email for forms
$geokey
=
''
;
$adminemail
=
''
;
$adminemail
=
''
;
//admin key for admin ratings
$adminkey
=
''
;
$adminkey
=
''
;
//mailchimp key
$chimpkey
=
''
;
$chimpkey
=
''
;
//apikey for public api calls
$apikey
=
''
;
$apikey
=
''
;
?>
?>
db/pull.sh
View file @
ef256991
WGET
=
"/usr/bin/wget"
WGET
=
"/usr/bin/wget"
if
[
-s
/tmp/index.google
]
;
then
if
[
-s
/tmp/index.google
]
;
then
echo
"already running"
echo
"already running
die
"
exit
;
exit
;
else
else
echo
"Checking for internet"
;
echo
"Checking for internet"
;
fi
fi
$WGET
-q
--tries
=
10
--timeout
=
15 http://www.google.com
-O
/tmp/index.google &> /dev/null
$WGET
-d
-v
--tries
=
10
--timeout
=
15 http://www.google.com
-O
/tmp/index.google
# &> /dev/null
sleep
2
if
[
!
-s
/tmp/index.google
]
;
then
if
[
!
-s
/tmp/index.google
]
;
then
echo
"could not update pods as no internet"
echo
"could not update pods as no internet"
rm
/tmp/index.google
rm
/tmp/index.google
exit
;
else
else
echo
"Pulling in new pod data"
;
echo
"Pulling in new pod data"
;
cd
/var/www/podup/db
cd
/var/www/podup/db
php5 pull.php
php5 pull.php
touch
last.data
touch
last.data
php5 backup.php
php5 backup.php
rm
/tmp/index.google
rm
/tmp/index.google
fi
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