mirror of
https://github.com/YunoHost-Apps/rocketchat_ynh.git
synced 2024-09-03 20:16:25 +02:00
Fixes path issues
This commit is contained in:
parent
595141a71e
commit
6df8d533d0
2 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
location ^~ #LOCATION# {
|
||||
alias #DESTDIR#/;
|
||||
rewrite ^#PATH#$ #PATH#/ permanent;
|
||||
proxy_pass http://localhost:#PORT#/;
|
||||
proxy_pass http://localhost:#PORT##PATH#;
|
||||
proxy_set_header Host $host;
|
||||
proxy_buffering off;
|
||||
}
|
||||
|
|
|
@ -67,8 +67,8 @@ ynh_app_setting_set $app final_path $final_path
|
|||
sudo mkdir -p $final_path
|
||||
|
||||
# Copy and set systemd configuration
|
||||
sed -i "s@#ROOTURL#@$domain/@g" ../conf/Rocketchat.service
|
||||
sed -i "s@#LOCATION#@/$path@g" ../conf/Rocketchat.service
|
||||
sed -i "s@#ROOTURL#@$domain@g" ../conf/Rocketchat.service
|
||||
sed -i "s@#LOCATION#@${path:-/}@g" ../conf/Rocketchat.service
|
||||
sed -i "s@#PORT#@/$port@g" ../conf/Rocketchat.service
|
||||
sudo cp ../conf/Rocketchat.service /etc/systemd/system/
|
||||
sudo systemctl daemon-reload
|
||||
|
@ -110,7 +110,7 @@ sudo yunohost service add Rocketchat
|
|||
|
||||
# wait for rocketchat to populate db and start (oneliner has to be improved)
|
||||
isup=false; x=45; while [ $x -gt 0 ];do echo "Waiting approx. $x seconds..."; \
|
||||
x=$(( $x - 1 )); sleep 1; if $(curl -m 1 -s localhost:$port/api/v1/info | \
|
||||
x=$(( $x - 1 )); sleep 1; if $(curl -m 1 -s localhost:$port${path:-/}/api/v1/info | \
|
||||
grep -e "success.*true" >/dev/null 2>%1); then isup=true; break; fi; done && if $isup; \
|
||||
then echo "service is up"; else ynh_die "$app could not be started"; fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue