3
3
4
4
set -xeuo pipefail
5
5
6
+ OPENQA_DIR=${OPENQA_DIR:=/ usr/ share/ openqa}
7
+
6
8
dbname=" ${dbname:= " openqa" } "
7
9
dbuser=" ${dbuser:= " geekotest" } "
8
10
running_systemd=
@@ -26,24 +28,24 @@ start-database() {
26
28
start-worker () {
27
29
if [[ -z $running_systemd ]]; then
28
30
/usr/bin/install -d -m 0755 -o _openqa-worker /var/lib/openqa/pool/1
29
- su _openqa-worker -c ' /usr/share/openqa/ script/worker --instance 1' &
31
+ su _openqa-worker -c " $OPENQA_DIR / script/worker --instance 1" &
30
32
else
31
33
systemctl enable --now openqa-worker@1
32
34
fi
33
35
}
34
36
35
37
start-daemons () {
36
38
if [[ -z $running_systemd ]]; then
37
- pgrep -f openqa-scheduler-daemon > /dev/null || su geekotest -c /usr/share/openqa/ script/openqa-scheduler-daemon &
38
- pgrep -f openqa-websockets-daemon > /dev/null || su geekotest -c /usr/share/openqa/ script/openqa-websockets-daemon &
39
- pgrep -f openqa-gru > /dev/null || su geekotest -c /usr/share/openqa/ script/openqa-gru &
40
- pgrep -f openqa-livehandler-daemon > /dev/null || su geekotest -c /usr/share/openqa/ script/openqa-livehandler-daemon &
39
+ pgrep -f openqa-scheduler-daemon > /dev/null || su geekotest -c " $OPENQA_DIR / script/openqa-scheduler-daemon" &
40
+ pgrep -f openqa-websockets-daemon > /dev/null || su geekotest -c " $OPENQA_DIR / script/openqa-websockets-daemon" &
41
+ pgrep -f openqa-gru > /dev/null || su geekotest -c " $OPENQA_DIR / script/openqa-gru" &
42
+ pgrep -f openqa-livehandler-daemon > /dev/null || su geekotest -c " $OPENQA_DIR / script/openqa-livehandler-daemon" &
41
43
if [[ $setup_web_proxy == " nginx" ]]; then
42
44
nginx
43
45
else
44
46
/usr/sbin/start_apache2 -k start
45
47
fi
46
- pgrep -f openqa-webui-daemon > /dev/null || su geekotest -c /usr/share/openqa/ script/openqa-webui-daemon &
48
+ pgrep -f openqa-webui-daemon > /dev/null || su geekotest -c " $OPENQA_DIR / script/openqa-webui-daemon" &
47
49
else
48
50
if [[ $setup_web_proxy == " nginx" ]]; then
49
51
systemctl enable --now nginx
@@ -101,12 +103,12 @@ retry -e -s 30 -r 7 -- sh -c "zypper -n --gpg-auto-import-keys ref && zypper -n
101
103
# setup database
102
104
chown -R postgres: /var/lib/pgsql/ # fix broken postgres working dir permissions in the nspawn container
103
105
start-database
104
- su postgres -c " /usr/share/openqa /script/setup-db" " $dbuser " " $dbname "
106
+ su postgres -c " $OPENQA_DIR /script/setup-db" " $dbuser " " $dbname "
105
107
106
108
# setup webserver and fake-auth
107
109
proxy_args=" "
108
110
[[ -n " $setup_web_proxy " ]] && proxy_args=" --proxy=$setup_web_proxy "
109
- setup=/usr/share/openqa /script/configure-web-proxy
111
+ setup=$OPENQA_DIR /script/configure-web-proxy
110
112
if command -v $setup ; then
111
113
bash -ex $setup " $proxy_args "
112
114
else
@@ -140,7 +142,7 @@ if [[ -z $skip_suse_tests ]]; then
140
142
# use faster local mirror if run from within SUSE network
141
143
export needles_giturl=" https://gitlab.suse.de/openqa/os-autoinst-needles-opensuse-mirror.git"
142
144
fi
143
- /usr/share/openqa/ script/fetchneedles
145
+ " $OPENQA_DIR / script/fetchneedles"
144
146
if [[ ! -e /var/lib/openqa/tests/sle ]]; then
145
147
ln -s opensuse /var/lib/openqa/tests/sle
146
148
fi
0 commit comments