Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
slapos
Commits
2db60f5b
Commit
2db60f5b
authored
Nov 27, 2022
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
peertube: restore fixup
parent
58db1a98
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
software/peertube/buildout.hash.cfg
software/peertube/buildout.hash.cfg
+1
-1
software/peertube/template-peertube-restore.sh.in
software/peertube/template-peertube-restore.sh.in
+14
-2
No files found.
software/peertube/buildout.hash.cfg
View file @
2db60f5b
...
@@ -54,4 +54,4 @@ md5sum = 58d1a4fe246169dea94d7d243b4bac9e
...
@@ -54,4 +54,4 @@ md5sum = 58d1a4fe246169dea94d7d243b4bac9e
[template-peertube-restore-script]
[template-peertube-restore-script]
filename = template-peertube-restore.sh.in
filename = template-peertube-restore.sh.in
md5sum =
8e6091bc739f44801f52b004fac136d9
md5sum =
5b9eea04afd548cfcb1e1a64b97a4f66
software/peertube/template-peertube-restore.sh.in
View file @
2db60f5b
...
@@ -46,9 +46,20 @@ else
...
@@ -46,9 +46,20 @@ else
$${postgresql:bin}/postgres -D $${postgresql:pgdata-directory} &
$${postgresql:bin}/postgres -D $${postgresql:pgdata-directory} &
postgres_pid=$!
postgres_pid=$!
echo $postgres_pid
echo $postgres_pid
echo "Anyway, the postgresql is running..."
fi
fi
echo "Anyway, the postgresql is running..."
if ! [ -e "$pid_file" ]; then
echo "postgresql exited..."
fi
tpgwait=60
while ! [ -e "$pid_file" ]; do
tpgwait=$(( $tpgwait - 1 ))
test $tpgwait = 0 && die "pid_file not exist"
echo "pid_file not exist; will retry $tpgwait times..." 1>&2
sleep 1
done
# run psql
# run psql
psql() {
psql() {
...
@@ -75,8 +86,9 @@ echo "Ready to check postgresql is running..."
...
@@ -75,8 +86,9 @@ echo "Ready to check postgresql is running..."
# sleep 5
# sleep 5
echo "Check postgresql is running again"
# Check the postgresql is running, if postgresql has stopped, abort
# Check the postgresql is running, if postgresql has stopped, abort
pid_file=$${postgresql:pgdata-directory}/postmaster.pid
if ! [ -e "$pid_file" ]; then
if ! [ -e "$pid_file" ]; then
echo "postgresql exited, aborting."
echo "postgresql exited, aborting."
exit 1
exit 1
...
...
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