1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/tiddlywiki_ynh.git synced 2024-09-03 20:26:34 +02:00

Merge pull request #48 from YunoHost-Apps/revert-47-testing

Revert "Testing"
This commit is contained in:
eric_G 2024-02-28 23:20:00 +01:00 committed by GitHub
commit 43261af2d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 29 additions and 10 deletions

View file

@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
TiddlyWiki is a complete interactive wiki in JavaScript. It can be used as a single HTML file in the browser or as a powerful Node.js application. It is highly customisable: the entire user interface is itself implemented in hackable WikiText.
**Shipped version:** 5.3.3~ynh2
**Shipped version:** 5.3.3~ynh1
**Demo:** https://tiddlywiki.com/

View file

@ -18,7 +18,7 @@ Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
TiddlyWiki est un wiki interactif complet en JavaScript. Il peut être utilisé comme un seul fichier HTML dans le navigateur ou comme une puissante application Node.js (cette dernière est utilisée pour YunoHost). Il est hautement personnalisable : toute l'interface utilisateur est elle-même implémentée dans WikiText modifiable.
**Version incluse :** 5.3.3~ynh2
**Version incluse :** 5.3.3~ynh1
**Démo :** https://tiddlywiki.com/

View file

@ -1,5 +1,5 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location ^__PATH__/ {
location __PATH__/ {
proxy_pass http://127.0.0.1:__PORT__/;
proxy_redirect off;

View file

@ -5,7 +5,7 @@ name = "TiddlyWiki"
description.en = "Non-linear personal web notebook"
description.fr = "Carnet Web personnel non linéaire"
version = "5.3.3~ynh2"
version = "5.3.3~ynh1"
maintainers = ["eric_G"]

View file

@ -4,7 +4,7 @@
# COMMON VARIABLES
#=================================================
nodejs_version="20"
nodejs_version="18"
#=================================================
# PERSONAL HELPERS

View file

@ -22,6 +22,7 @@ ynh_use_nodejs
#=================================================
ynh_script_progression --message="Setting up source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir"
chmod -R o-rwx "$install_dir"
@ -32,11 +33,13 @@ chown -R $app:www-data "$install_dir"
#=================================================
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
# Create a dedicated systemd config
ynh_add_systemd_config
yunohost service add $app --description="Non-linear personal web notebook" --log="/var/log/$app/$app.log"
yunohost service add $app --description="A non-linear personal web notebook"
#=================================================
# ADD A CONFIGURATION

View file

@ -23,8 +23,10 @@ then
yunohost service remove $app
fi
# Remove the dedicated systemd config
ynh_remove_systemd_config
# Remove the dedicated NGINX config
ynh_remove_nginx_config
ynh_remove_nodejs

View file

@ -36,6 +36,7 @@ chown -R $app:www-data "$data_dir"
#=================================================
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
# Install Nodejs
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
ynh_use_nodejs
@ -51,7 +52,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet
yunohost service add $app --description="Non-linear personal web notebook" --log="/var/log/$app/$app.log"
yunohost service add $app --description="A non-linear personal web notebook"
#=================================================
# GENERIC FINALIZATION

View file

@ -9,6 +9,12 @@
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
@ -21,9 +27,14 @@ ynh_systemd_action --service_name=$app --action="stop"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Upgrading source files..."
ynh_setup_source --dest_dir="$install_dir"
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir"
fi
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
@ -41,11 +52,13 @@ ynh_use_nodejs
#=================================================
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=5
# Create a dedicated NGINX config
ynh_add_nginx_config
# Create a dedicated systemd config
ynh_add_systemd_config
yunohost service add $app --description="Non-linear personal web notebook" --log="/var/log/$app/$app.log"
yunohost service add $app --description="A non-linear personal web notebook"
#=================================================
# START SYSTEMD SERVICE