1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git synced 2024-09-03 18:36:09 +02:00

Upgrade requirements

This commit is contained in:
ericgaspar 2021-05-14 16:05:08 +02:00
parent d0fb6f9635
commit 93fa606227
4 changed files with 5 additions and 12 deletions

View file

@ -18,7 +18,7 @@
"email": "maniackc_dev@crudelis.fr"
}],
"requirements": {
"yunohost": ">= 4.1.7"
"yunohost": ">= 4.2.4"
},
"multi_instance": true,
"services": [

View file

@ -8,7 +8,6 @@
# Load common variables for all scripts.
source _variables
source _common.sh
source /usr/share/yunohost/helpers

View file

@ -220,7 +220,7 @@ chmod 600 $final_path/credentials.json
ynh_script_progression --message="Configuring a systemd service..." --weight=4
# Create a dedicated systemd config
ynh_add_systemd_config --others_var="ynh_node_load_PATH"
ynh_add_systemd_config
#=================================================
# ADVERTISE SERVICE IN ADMIN PANEL
@ -278,10 +278,7 @@ then
ynh_replace_string --match_string="^ *\"FOOTER\": .*2.0" --replace_string="& | <a href='../admin'>Etherpad admin</a>" --target_file=$final_path/node_modules/ep_mypads/static/l10n/en.json
ynh_replace_string --match_string="^ *\"FOOTER\": .*2.0" --replace_string="& | <a href='../admin'>Etherpad admin</a>" --target_file=$final_path/node_modules/ep_mypads/static/l10n/fr.json
## Find the /div just after the field to open a pad
#mod_line=$(grep -nA5 "index.createOpenPad" $final_path/src/templates/index.html | grep "</div>" | cut -d '-' -f 1)
## In order to add a link to MyPads plugin.
#sed -i "$mod_line s@div>@&\n\t<center><br><font size="5"><a href="./mypads/">MyPads</a></font></center>@" $final_path/src/templates/index.html
# Find the /div just after the field to open a pad in order to add a link to MyPads plugin.
sed -i '157i<center><br><font size="4"><a href="./mypads/" style="text-decoration: none; color: #555">MyPads</a></font></center>' $final_path/src/templates/index.html
fi

View file

@ -432,7 +432,7 @@ ynh_script_progression --message="Upgrading systemd configuration..." --weight=2
# Overwrite the systemd configuration only if it's allowed
if [ $overwrite_systemd -eq 1 ]
then
ynh_add_systemd_config --others_var="ynh_node_load_PATH"
ynh_add_systemd_config
fi
#=================================================
@ -441,10 +441,7 @@ fi
if [ "$upgrade_type" == "UPGRADE_APP" ] && [ $mypads -eq 1 ]
then
# # Find the /div just after the field to open a pad
# mod_line=$(grep -nA5 "index.createOpenPad" $final_path/src/templates/index.html | grep "</div>" | cut -d '-' -f 1)
# # In order to add a link to mypads plugin.
# sed -i "$mod_line s@div>@&\n\t<center><br><font size="5"><a href="./mypads/">MyPads</a></font></center>@" $final_path/src/templates/index.html
# Find the /div just after the field to open a pad in order to add a link to mypads plugin.
sed -i '157i<center><br><font size="4"><a href="./mypads/" style="text-decoration: none; color: #555">MyPads</a></font></center>' $final_path/src/templates/index.html
fi