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
Boxiang Sun
slapos
Commits
5547a758
Commit
5547a758
authored
Dec 06, 2022
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
peertube: fixup
parent
13fdef74
Pipeline
#25208
passed with stage
in 0 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
35 deletions
+5
-35
software/peertube/buildout.hash.cfg
software/peertube/buildout.hash.cfg
+2
-2
software/peertube/instance-peertube.cfg.in
software/peertube/instance-peertube.cfg.in
+1
-3
software/peertube/template-peertube-restore.sh.in
software/peertube/template-peertube-restore.sh.in
+2
-30
No files found.
software/peertube/buildout.hash.cfg
View file @
5547a758
...
@@ -18,7 +18,7 @@ md5sum = 35690065ba18dc49d0108fc1f0a07b9e
...
@@ -18,7 +18,7 @@ md5sum = 35690065ba18dc49d0108fc1f0a07b9e
[instance-peertube]
[instance-peertube]
_update_hash_filename_ = instance-peertube.cfg.in
_update_hash_filename_ = instance-peertube.cfg.in
md5sum =
db076bb9b8e5392ec560b15236c8f1d0
md5sum =
053edcc9d593dfb869be9fe4b1850b3f
[template-nginx-service]
[template-nginx-service]
filename = template-nginx-service.sh.in
filename = template-nginx-service.sh.in
...
@@ -54,4 +54,4 @@ md5sum = e50daa16a2c1866997933981bed45271
...
@@ -54,4 +54,4 @@ md5sum = e50daa16a2c1866997933981bed45271
[template-peertube-restore-script]
[template-peertube-restore-script]
filename = template-peertube-restore.sh.in
filename = template-peertube-restore.sh.in
md5sum = b
4f2460cb1acb256b32442034aec1cfd
md5sum = b
8508e3eef74f1903e328b52bc5ddc03
software/peertube/instance-peertube.cfg.in
View file @
5547a758
...
@@ -124,9 +124,7 @@ config-file = ${directory:etc}/redis.conf
...
@@ -124,9 +124,7 @@ config-file = ${directory:etc}/redis.conf
log-file = ${redis:log}/redis.log
log-file = ${redis:log}/redis.log
pid-file = ${directory:run}/redis.pid
pid-file = ${directory:run}/redis.pid
use-passwd = false
use-passwd = false
# If we want to run the peertube test locally, the length of the socket path
unixsocket = ${:server-dir}/redis.socket
# should not too long
unixsocket = ${directory:var}/r.socket
# port = 0 means "don't listen on TCP at all" - listen only on unix socket
# port = 0 means "don't listen on TCP at all" - listen only on unix socket
ipv6 = ::1
ipv6 = ::1
port = 0
port = 0
...
...
software/peertube/template-peertube-restore.sh.in
View file @
5547a758
...
@@ -15,17 +15,6 @@ die() {
...
@@ -15,17 +15,6 @@ die() {
exit 1
exit 1
}
}
pg_version=$${postgresql:pgdata-directory}/PG_VERSION
echo "Check postgresql data directory is ready"
tpgwait=60
while ! [ -e "$pg_version" ]; do
tpgwait=$(( $tpgwait - 1 ))
test $tpgwait = 0 && die "PGdata directory not ready"
echo "I: PGdata directory is not ready (yet ?); will retry $tpgwait times..." 1>&2
sleep 1
done
echo "Postgresql data directory is ready"
echo "Postgresql data directory is ready"
# 2. Make sure the postgresql process is not running.
# 2. Make sure the postgresql process is not running.
# Quote from the postgresql doc:
# Quote from the postgresql doc:
...
@@ -39,18 +28,11 @@ if [ -e "$pid_file" ]; then
...
@@ -39,18 +28,11 @@ if [ -e "$pid_file" ]; then
fi
fi
echo "Starting postgresql..."
echo "Starting postgresql..."
$${postgresql:bin}/postgres -D $${postgresql:pgdata-directory} -h $${postgresql:ipv4} -p $${postgresql:port} &
# $${postgresql:bin}/postgres -D $${postgresql:pgdata-directory} -h $${postgresql:ipv4} -p $${postgresql:port} &
$${postgresql:bin}/postgres -D $${postgresql:pgdata-directory} &
postgresql_pid=$!
postgresql_pid=$!
trap "kill $postgresql_pid" EXIT TERM INT
trap "kill $postgresql_pid" EXIT TERM INT
pgwait=60
while ! [ -e "$pid_file" ]; do
tpgwait=$(( $tpgwait - 1 ))
test $tpgwait = 0 && die "Can not create pid_file"
echo "pid_file not exist; will retry $tpgwait times..." 1>&2
sleep 1
done
# If postgres has stopped, abort
# If postgres has stopped, abort
if ! [ -d /proc/$postgresql_pid ]; then
if ! [ -d /proc/$postgresql_pid ]; then
echo "postgresql exited, aborting."
echo "postgresql exited, aborting."
...
@@ -81,16 +63,6 @@ while true; do
...
@@ -81,16 +63,6 @@ while true; do
done
done
echo "I: PostgreSQL ready." 1>&2
echo "I: PostgreSQL ready." 1>&2
# sleep 5
echo "Check postgresql is running again"
# Check the postgresql is running, if postgresql has stopped, abort
if ! [ -e "$pid_file" ]; then
echo "postgresql exited, aborting."
exit 1
fi
echo "Postgresql is running, ready to restore"
echo "Postgresql is running, ready to restore"
# Restore the database
# Restore the database
...
...
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