Commit 0e352ff7 authored by Boxiang Sun's avatar Boxiang Sun

theia: peertube test fixup

parent 16a8c954
...@@ -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 = 0bc5a5fbf922fc884f00038f19faa147 md5sum = 5c46dd0727254b9ce0dadb396c57834b
[template-nginx-service] [template-nginx-service]
filename = template-nginx-service.sh.in filename = template-nginx-service.sh.in
...@@ -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 = fb7b8ebb4724495a7d17ab93c8464515 md5sum = dd19cdff0e5af606a4359f7ccf8beaa5
...@@ -52,6 +52,12 @@ ssl = ${:etc}/ssl ...@@ -52,6 +52,12 @@ ssl = ${:etc}/ssl
[postgresql-password] [postgresql-password]
recipe = slapos.cookbook:generate.password recipe = slapos.cookbook:generate.password
[postgresql-address]
recipe = slapos.cookbook:free_port
minimum = 5432
maximum = 5452
ip = {{ ipv4_random }}
[postgresql] [postgresql]
recipe = slapos.cookbook:postgres recipe = slapos.cookbook:postgres
bin = {{ postgresql10_location }}/bin/ bin = {{ postgresql10_location }}/bin/
...@@ -61,10 +67,10 @@ superuser = peertube ...@@ -61,10 +67,10 @@ superuser = peertube
password = ${postgresql-password:passwd} password = ${postgresql-password:passwd}
pgdata-directory = ${directory:srv}/postgresql pgdata-directory = ${directory:srv}/postgresql
ipv4 = {{ ipv4_random }} ipv4 = ${postgresql-address:ip}
# disable listening on ipv6 # disable listening on ipv6
ipv6 = ipv6 =
port = 5432 port = ${postgresql-address:port}
[postgresql-binary-link] [postgresql-binary-link]
recipe = slapos.cookbook:symbolic.link recipe = slapos.cookbook:symbolic.link
......
...@@ -10,12 +10,6 @@ ...@@ -10,12 +10,6 @@
# Depending on the output, it will create a file containing # Depending on the output, it will create a file containing
# the status of the restoration (success or failure) # the status of the restoration (success or failure)
slapos node stop all
slapos_node_status_pid=$!
echo $slapos_node_status_pid
wait $slapos_node_status_pid
die() { die() {
echo "$*" 1>&2 echo "$*" 1>&2
exit 1 exit 1
...@@ -40,11 +34,8 @@ echo "Postgresql data directory is ready" ...@@ -40,11 +34,8 @@ echo "Postgresql data directory is ready"
# which means if the postmaster.pid exist, then the postgresql is running. # which means if the postmaster.pid exist, then the postgresql is running.
pid_file=$${postgresql:pgdata-directory}/postmaster.pid pid_file=$${postgresql:pgdata-directory}/postmaster.pid
if [ -e "$pid_file" ]; then if [ -e "$pid_file" ]; then
echo "Postgresql is running, continue." echo "Postgresql is running, this should not happened, aborting."
else else
echo "Stop postgresql service"
$${postgresql:bin}/pg_ctl -D $${postgresql:pgdata-directory} stop
wait
echo "Starting postgresql..." echo "Starting postgresql..."
$${postgresql:bin}/postgres -D $${postgresql:pgdata-directory} $${postgresql:bin}/postgres -D $${postgresql:pgdata-directory}
wait wait
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment