mirror of
https://github.com/YunoHost-Apps/petrolette_ynh.git
synced 2024-09-03 19:56:26 +02:00
use relative path
This commit is contained in:
parent
c791d39044
commit
36f4637785
3 changed files with 2 additions and 13 deletions
|
@ -72,17 +72,6 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
|||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
|
||||
|
||||
if [ $change_path -eq 1 ]
|
||||
then
|
||||
if [ $old_path = "/" ] ; then
|
||||
sed -i "s|\$.get(\"/feed\", {|\$.get(\"$path_url/feed\", {|" public/js/PTL.feed.js
|
||||
else if [ $new_path = "/" ] ; then
|
||||
sed -i "s|\$.get(\"$old_path/feed\", {|\$.get(\"/feed\", {|" public/js/PTL.feed.js
|
||||
else
|
||||
sed -i "s|\$.get(\"$old_path/feed\", {|\$.get(\"$path_url/feed\", {|" public/js/PTL.feed.js
|
||||
fi
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# MODIFY URL IN NGINX CONF
|
||||
#=================================================
|
||||
|
|
|
@ -112,7 +112,7 @@ pushd $final_path
|
|||
ynh_add_config --template="petrolette.config.json" --destination="petrolette.config.json"
|
||||
fi
|
||||
if [ "$path_url" != "/" ] ; then
|
||||
sed -i "s|\$.get(\"/feed\", {|\$.get(\"$path_url/feed\", {|" public/js/PTL.feed.js
|
||||
sed -i "s|\$.get(\"/feed\", {|\$.get(\"feed\", {|" public/js/PTL.feed.js
|
||||
fi
|
||||
[[ -v HOME ]] && TMP_HOME=$HOME
|
||||
HOME=$(pwd)
|
||||
|
|
|
@ -100,7 +100,7 @@ pushd $final_path
|
|||
sed -i "/HTTP_PORT/s/[0-9]*[0-9]/$port/" package.json
|
||||
sed -i "/HTTPS_PORT/s/[0-9]*[0-9]/$https_port/" package.json
|
||||
if [ "$path_url" != "/" ] ; then
|
||||
sed -i "s|\$.get(\"/feed\", {|\$.get(\"$path_url/feed\", {|" public/js/PTL.feed.js
|
||||
sed -i "s|\$.get(\"/feed\", {|\$.get(\"feed\", {|" public/js/PTL.feed.js
|
||||
fi
|
||||
|
||||
[[ -v HOME ]] && TMP_HOME=$HOME
|
||||
|
|
Loading…
Add table
Reference in a new issue