From f616653ec4546bd3ba29bd492c2e82f531dc0095 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 1 Feb 2019 22:05:42 +0100 Subject: [PATCH 01/37] Remove app.src information as we retrieve source from git --- conf/app.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/app.src b/conf/app.src index 9eaaaf7..e4dd89f 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,4 +1,4 @@ -SOURCE_URL=https://github.com/Requarks/wiki/releases/download/2.0.0-beta.11/wiki-js.tar.gz +SOURCE_URL=url of app's source SOURCE_SUM=sha256 checksum SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz From f02a3a54e5dfd04ff4640344795480131d212f4b Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 1 Feb 2019 22:11:47 +0100 Subject: [PATCH 02/37] Add ynh_systemd_action Helper --- scripts/backup | 3 +- scripts/install | 12 +++-- scripts/remove | 1 + scripts/restore | 11 +++-- scripts/upgrade | 15 ++++++- scripts/ynh_systemd_action | 89 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 123 insertions(+), 8 deletions(-) create mode 100644 scripts/ynh_systemd_action diff --git a/scripts/backup b/scripts/backup index 4a8b7f0..93302d7 100644 --- a/scripts/backup +++ b/scripts/backup @@ -7,6 +7,7 @@ #================================================= source ../settings/scripts/_common.sh +source ../settings/scripts/ynh_systemd_action source /usr/share/yunohost/helpers #================================================= @@ -15,7 +16,7 @@ source /usr/share/yunohost/helpers ynh_clean_setup () { ### Remove this function if there's nothing to clean before calling the remove script. - true + ynh_clean_check_starting } # Exit if an error occurs during the execution of the script ynh_abort_if_errors diff --git a/scripts/install b/scripts/install index c45ea91..ab0b3f5 100644 --- a/scripts/install +++ b/scripts/install @@ -7,6 +7,7 @@ #================================================= source _common.sh +source ynh_systemd_action source /usr/share/yunohost/helpers #================================================= @@ -15,7 +16,7 @@ source /usr/share/yunohost/helpers ynh_clean_setup () { ### Remove this function if there's nothing to clean before calling the remove script. - true + ynh_clean_check_starting } # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -317,6 +318,11 @@ fi #================================================= # RELOAD NGINX #================================================= -systemctl start $app + systemctl reload nginx -sleep 30 + +#================================================= +# START SERVICE +#================================================= + +ynh_systemd_action --action=start --service_name=$app diff --git a/scripts/remove b/scripts/remove index 39d1815..8d69c35 100644 --- a/scripts/remove +++ b/scripts/remove @@ -7,6 +7,7 @@ #================================================= source _common.sh +source ynh_systemd_action source /usr/share/yunohost/helpers #================================================= diff --git a/scripts/restore b/scripts/restore index b6fb475..0005bb5 100644 --- a/scripts/restore +++ b/scripts/restore @@ -7,6 +7,7 @@ #================================================= source ../settings/scripts/_common.sh +source ../settings/scripts/ynh_systemd_action source /usr/share/yunohost/helpers #================================================= @@ -15,7 +16,7 @@ source /usr/share/yunohost/helpers ynh_clean_setup () { #### Remove this function if there's nothing to clean before calling the remove script. - true + ynh_clean_check_starting } # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -100,7 +101,6 @@ ynh_install_nodejs 10 ynh_restore_file "/etc/systemd/system/$app.service" systemctl enable $app.service -systemctl start $app #================================================= # ADVERTISE SERVICE IN ADMIN PANEL @@ -128,4 +128,9 @@ ynh_restore_file "/etc/logrotate.d/$app" #systemctl reload php5-fpm systemctl reload nginx -sleep 30 + +#================================================= +# START SERVICE +#================================================= + +ynh_systemd_action --action=start --service_name=$app diff --git a/scripts/upgrade b/scripts/upgrade index d304d57..6539f0b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -7,6 +7,7 @@ #================================================= source _common.sh +source ynh_systemd_action source /usr/share/yunohost/helpers #================================================= @@ -58,10 +59,17 @@ ynh_backup_before_upgrade ynh_clean_setup () { # restore it if the upgrade fails ynh_restore_upgradebackup + ynh_clean_check_starting } # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#================================================= +# STOP SERVICE +#================================================= + +ynh_systemd_action --action=stop --service_name=$app + #================================================= # CHECK THE PATH #================================================= @@ -172,4 +180,9 @@ fi #================================================= systemctl reload nginx -sleep 30 + +#================================================= +# START SERVICE +#================================================= + +ynh_systemd_action --action=start --service_name=$app diff --git a/scripts/ynh_systemd_action b/scripts/ynh_systemd_action new file mode 100644 index 0000000..6bed6be --- /dev/null +++ b/scripts/ynh_systemd_action @@ -0,0 +1,89 @@ +#!/bin/bash + +# Start (or other actions) a service, print a log in case of failure and optionnaly wait until the service is completely started +# +# usage: ynh_systemd_action [-n service_name] [-a action] [ [-l "line to match"] [-p log_path] [-t timeout] [-e length] ] +# | arg: -n, --service_name= - Name of the service to reload. Default : $app +# | arg: -a, --action= - Action to perform with systemctl. Default: start +# | arg: -l, --line_match= - Line to match - The line to find in the log to attest the service have finished to boot. +# If not defined it don't wait until the service is completely started. +# | arg: -p, --log_path= - Log file - Path to the log file. Default : /var/log/$app/$app.log +# | arg: -t, --timeout= - Timeout - The maximum time to wait before ending the watching. Default : 300 seconds. +# | arg: -e, --length= - Length of the error log : Default : 20 +ynh_systemd_action() { + # Declare an array to define the options of this helper. + declare -Ar args_array=( [n]=service_name= [a]=action= [l]=line_match= [p]=log_path= [t]=timeout= [e]=length= ) + local service_name + local action + local line_match + local length + local log_path + local timeout + + # Manage arguments with getopts + ynh_handle_getopts_args "$@" + + local service_name="${service_name:-$app}" + local action=${action:-start} + local log_path="${log_path:-/var/log/$service_name/$service_name.log}" + local length=${length:-20} + local timeout=${timeout:-300} + + # Start to read the log + if [[ -n "${line_match:-}" ]] + then + local templog="$(mktemp)" + # Following the starting of the app in its log + if [ "$log_path" == "systemd" ] ; then + # Read the systemd journal + journalctl -u $service_name -f --since=-45 > "$templog" & + else + # Read the specified log file + tail -F -n0 "$log_path" > "$templog" & + fi + # Get the PID of the tail command + local pid_tail=$! + fi + + echo "${action^} the service $service_name" >&2 + systemctl $action $service_name \ + || ( journalctl --lines=$length -u $service_name >&2 \ + ; test -n "$log_path" && echo "--" && tail --lines=$length "$log_path" >&2 \ + ; false ) + + # Start the timeout and try to find line_match + if [[ -n "${line_match:-}" ]] + then + local i=0 + for i in $(seq 1 $timeout) + do + # Read the log until the sentence is found, that means the app finished to start. Or run until the timeout + if grep --quiet "$line_match" "$templog" + then + echo "The service $service_name has correctly started." >&2 + break + fi + echo -n "." >&2 + sleep 1 + done + if [ $i -eq $timeout ] + then + echo "The service $service_name didn't fully started before the timeout." >&2 + journalctl --lines=$length -u $service_name >&2 + test -n "$log_path" && echo "--" && tail --lines=$length "$log_path" >&2 + fi + + echo "" + ynh_clean_check_starting + fi +} + +# Clean temporary process and file used by ynh_check_starting +# (usually used in ynh_clean_setup scripts) +# +# usage: ynh_clean_check_starting +ynh_clean_check_starting () { + # Stop the execution of tail. + kill -s 15 $pid_tail 2>&1 + ynh_secure_remove "$templog" 2>&1 +} From 3f3fec6d1c7765f69c58f54a23489e1602780f0b Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 2 Feb 2019 00:33:27 +0100 Subject: [PATCH 03/37] Fix Service logs --- conf/systemd.service | 2 +- scripts/install | 10 +++++++++- scripts/restore | 8 ++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 35c2d16..eb1c958 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__/ -ExecStart=__NODEJS_PATH__/node __FINALPATH__/server >> /var/log/__APP__/__APP__.log 2>&1 +ExecStart=/bin/sh -c '__NODEJS_PATH__/node __FINALPATH__/server >> /var/log/__APP__/__APP__.log 2>&1' [Install] WantedBy=multi-user.target diff --git a/scripts/install b/scripts/install index ab0b3f5..3eb34c6 100644 --- a/scripts/install +++ b/scripts/install @@ -170,9 +170,17 @@ ynh_system_user_create "$app" "$final_path" #================================================= # SPECIFIC SETUP #================================================= -# ... +# CREATE LOG FOLDER #================================================= +mkdir -p "/var/log/$app" +chown -R "$app":"$app" "/var/log/$app" + +#================================================= +# MAKE SETUP +#================================================= + + chown -R "$app":"$app" "$final_path" pushd $final_path diff --git a/scripts/restore b/scripts/restore index 0005bb5..4151059 100644 --- a/scripts/restore +++ b/scripts/restore @@ -101,6 +101,7 @@ ynh_install_nodejs 10 ynh_restore_file "/etc/systemd/system/$app.service" systemctl enable $app.service +systemctl daemon-reload #================================================= # ADVERTISE SERVICE IN ADMIN PANEL @@ -129,6 +130,13 @@ ynh_restore_file "/etc/logrotate.d/$app" #systemctl reload php5-fpm systemctl reload nginx +#================================================= +# CREATE LOG FOLDER +#================================================= + +mkdir -p "/var/log/$app" +chown -R "$app":"$app" "/var/log/$app" + #================================================= # START SERVICE #================================================= From 6880f71a6feb4842fa7181c44bda529d0d0973f0 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 2 Feb 2019 06:59:04 +0100 Subject: [PATCH 04/37] Clean up --- scripts/install | 19 +++++++++---------- scripts/upgrade | 16 ++++++++-------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/scripts/install b/scripts/install index 3eb34c6..7283b44 100644 --- a/scripts/install +++ b/scripts/install @@ -180,18 +180,17 @@ chown -R "$app":"$app" "/var/log/$app" # MAKE SETUP #================================================= - chown -R "$app":"$app" "$final_path" pushd $final_path -ynh_use_nodejs -sudo -u $app env PATH=$PATH:$nodejs_path npm install "graphql@^0.13.1" -sudo -u $app env PATH=$PATH:$nodejs_path npm install "acorn@^6.0.0" -sudo -u $app env PATH=$PATH:$nodejs_path npm install "babel-core@>=6.0.20" -sudo -u $app env PATH=$PATH:$nodejs_path npm install "eslint@>=5.0.0" -sudo -u $app env PATH=$PATH:$nodejs_path npm install -sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix -sudo -u $app env PATH=$PATH:$nodejs_path npm run build + ynh_use_nodejs + sudo -u $app env PATH=$PATH:$nodejs_path npm install "graphql@^0.13.1" + sudo -u $app env PATH=$PATH:$nodejs_path npm install "acorn@^6.0.0" + sudo -u $app env PATH=$PATH:$nodejs_path npm install "babel-core@>=6.0.20" + sudo -u $app env PATH=$PATH:$nodejs_path npm install "eslint@>=5.0.0" + sudo -u $app env PATH=$PATH:$nodejs_path npm install + sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix + sudo -u $app env PATH=$PATH:$nodejs_path npm run build popd @@ -333,4 +332,4 @@ systemctl reload nginx # START SERVICE #================================================= -ynh_systemd_action --action=start --service_name=$app +ynh_systemd_action --action=start --service_name=$app --line_match="Browse to http://localhost:" diff --git a/scripts/upgrade b/scripts/upgrade index 6539f0b..65214a0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -124,14 +124,14 @@ ynh_system_user_create "$app" "$final_path" chown -R "$app":"$app" "$final_path" pushd $final_path -ynh_use_nodejs -sudo -u $app env PATH=$PATH:$nodejs_path npm install "graphql@^0.13.1" -sudo -u $app env PATH=$PATH:$nodejs_path npm install "acorn@^6.0.0" -sudo -u $app env PATH=$PATH:$nodejs_path npm install "babel-core@>=6.0.20" -sudo -u $app env PATH=$PATH:$nodejs_path npm install "eslint@>=5.0.0" -sudo -u $app env PATH=$PATH:$nodejs_path npm install -sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix -sudo -u $app env PATH=$PATH:$nodejs_path npm run build + ynh_use_nodejs + sudo -u $app env PATH=$PATH:$nodejs_path npm install "graphql@^0.13.1" + sudo -u $app env PATH=$PATH:$nodejs_path npm install "acorn@^6.0.0" + sudo -u $app env PATH=$PATH:$nodejs_path npm install "babel-core@>=6.0.20" + sudo -u $app env PATH=$PATH:$nodejs_path npm install "eslint@>=5.0.0" + sudo -u $app env PATH=$PATH:$nodejs_path npm install + sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix + sudo -u $app env PATH=$PATH:$nodejs_path npm run build popd ### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script. From 416f80c2214e85202ac24dc124ba234151ba01a5 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 01:05:05 +0100 Subject: [PATCH 05/37] remove --production --- scripts/remove | 1 - scripts/restore | 2 +- scripts/upgrade | 9 +++------ 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/scripts/remove b/scripts/remove index 8d69c35..9f2ab84 100644 --- a/scripts/remove +++ b/scripts/remove @@ -63,7 +63,6 @@ ynh_remove_nodejs #================================================= # remove tmp files -sudo -u $app rm -rf /tmp/* ynh_secure_remove "/var/tmp/*" # Remove the app directory securely diff --git a/scripts/restore b/scripts/restore index 4151059..24408ab 100644 --- a/scripts/restore +++ b/scripts/restore @@ -141,4 +141,4 @@ chown -R "$app":"$app" "/var/log/$app" # START SERVICE #================================================= -ynh_systemd_action --action=start --service_name=$app +ynh_systemd_action --action=start --service_name=$app --line_match="Browse to http://localhost:" diff --git a/scripts/upgrade b/scripts/upgrade index 65214a0..a88ccc9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -125,11 +125,8 @@ chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs - sudo -u $app env PATH=$PATH:$nodejs_path npm install "graphql@^0.13.1" - sudo -u $app env PATH=$PATH:$nodejs_path npm install "acorn@^6.0.0" - sudo -u $app env PATH=$PATH:$nodejs_path npm install "babel-core@>=6.0.20" - sudo -u $app env PATH=$PATH:$nodejs_path npm install "eslint@>=5.0.0" - sudo -u $app env PATH=$PATH:$nodejs_path npm install + sudo -u $app env PATH=$PATH:$nodejs_path npm update --production + sudo -u $app env PATH=$PATH:$nodejs_path npm install --production sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix sudo -u $app env PATH=$PATH:$nodejs_path npm run build popd @@ -185,4 +182,4 @@ systemctl reload nginx # START SERVICE #================================================= -ynh_systemd_action --action=start --service_name=$app +ynh_systemd_action --action=start --service_name=$app --line_match="Browse to http://localhost:" From 61525ea66769cac25673a9e19cf53579afb40f33 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 01:09:50 +0100 Subject: [PATCH 06/37] remove --production --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index a88ccc9..ede61ab 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -125,8 +125,8 @@ chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs - sudo -u $app env PATH=$PATH:$nodejs_path npm update --production - sudo -u $app env PATH=$PATH:$nodejs_path npm install --production + sudo -u $app env PATH=$PATH:$nodejs_path npm update + sudo -u $app env PATH=$PATH:$nodejs_path npm install sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix sudo -u $app env PATH=$PATH:$nodejs_path npm run build popd From 07640c66853fb04c4eab28e7f8be86b384d7857d Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 02:40:30 +0100 Subject: [PATCH 07/37] Force 2.0.0-beta.17 --- README.md | 2 +- manifest.json | 2 +- scripts/install | 14 +++++++++----- scripts/upgrade | 25 ++++++++++++++++++++++--- 4 files changed, 33 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 6afb824..4631eb7 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ An open source, modern and powerful wiki app built on Node.js, Git and Markdown **Wiki.js is still under development, all features not already implemented.** -**Shipped version:** 2.0.0-beta.11 +**Shipped version:** 2.0.0-beta.17 ## Licence diff --git a/manifest.json b/manifest.json index 1aa8d07..ca8cffa 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "An open source, modern and powerful wiki app built on Node.js, Git and Markdown for YunoHost.", "fr": "Un wiki moderne et open source propulsé Node.js, Git et Markdown pour YunoHost." }, - "version": "2.0.0-beta.11~ynh1", + "version": "2.0.0-beta.17~ynh1", "url": "https://wiki.js.org/", "license": "AGPL-3.0-or-later", "maintainer": { diff --git a/scripts/install b/scripts/install index 7283b44..01b5246 100644 --- a/scripts/install +++ b/scripts/install @@ -133,6 +133,10 @@ ynh_app_setting_set $app final_path $final_path #ynh_setup_source "$final_path" git clone https://github.com/Requarks/wiki "$final_path" +pushd $final_path + git checkout 2.0.0-beta.17 +popd + #================================================= # NGINX CONFIGURATION #================================================= @@ -184,11 +188,11 @@ chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs - sudo -u $app env PATH=$PATH:$nodejs_path npm install "graphql@^0.13.1" - sudo -u $app env PATH=$PATH:$nodejs_path npm install "acorn@^6.0.0" - sudo -u $app env PATH=$PATH:$nodejs_path npm install "babel-core@>=6.0.20" - sudo -u $app env PATH=$PATH:$nodejs_path npm install "eslint@>=5.0.0" - sudo -u $app env PATH=$PATH:$nodejs_path npm install + #sudo -u $app env PATH=$PATH:$nodejs_path npm install "graphql@^0.13.1" --save --production + #sudo -u $app env PATH=$PATH:$nodejs_path npm install "acorn@^6.0.0" --save --production + #sudo -u $app env PATH=$PATH:$nodejs_path npm install "babel-core@>=6.0.20" --save --production + #sudo -u $app env PATH=$PATH:$nodejs_path npm install "eslint@>=5.0.0" --save --production + sudo -u $app env PATH=$PATH:$nodejs_path npm install --production sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix sudo -u $app env PATH=$PATH:$nodejs_path npm run build popd diff --git a/scripts/upgrade b/scripts/upgrade index ede61ab..8bb9440 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -85,7 +85,11 @@ path_url=$(ynh_normalize_url_path $path_url) # Download, check integrity, uncompress and patch the source from app.src #ynh_setup_source "$final_path" -( cd $final_path && git pull ) + +pushd $final_path + git pull + git checkout 2.0.0-beta.17 +popd #================================================= # NGINX CONFIGURATION @@ -125,12 +129,27 @@ chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs - sudo -u $app env PATH=$PATH:$nodejs_path npm update - sudo -u $app env PATH=$PATH:$nodejs_path npm install + sudo -u $app env PATH=$PATH:$nodejs_path npm update --production + sudo -u $app env PATH=$PATH:$nodejs_path npm install --production sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix sudo -u $app env PATH=$PATH:$nodejs_path npm run build popd + +#================================================= +# MODIFY A CONFIG FILE +#================================================= + +cp -f ../conf/config.sample.yml "$final_path/config.yml" + +### `ynh_replace_string` is used to replace a string in a file. +### (It's compatible with sed regular expressions syntax) + +#ynh_replace_string "match_string" "replace_string" "$final_path/config.yml" +ynh_replace_string "__PORT__" "$port" "$final_path/config.yml" +ynh_replace_string "__DB_PWD__" "$db_pwd" "$final_path/config.yml" +ynh_replace_string "__DB_NAME__" "$db_name" "$final_path/config.yml" + ### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script. ### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it. ynh_backup_if_checksum_is_different "$final_path/config.yml" From f3138d5193d7fe328abb0ee530e0df2d91a976a5 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 02:45:45 +0100 Subject: [PATCH 08/37] Update module list --- scripts/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 01b5246..4ad5101 100644 --- a/scripts/install +++ b/scripts/install @@ -188,9 +188,9 @@ chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs - #sudo -u $app env PATH=$PATH:$nodejs_path npm install "graphql@^0.13.1" --save --production - #sudo -u $app env PATH=$PATH:$nodejs_path npm install "acorn@^6.0.0" --save --production - #sudo -u $app env PATH=$PATH:$nodejs_path npm install "babel-core@>=6.0.20" --save --production + sudo -u $app env PATH=$PATH:$nodejs_path npm install "graphql@^0.13.0" --save --production + sudo -u $app env PATH=$PATH:$nodejs_path npm install "acorn@^6.0.0" --save --production + sudo -u $app env PATH=$PATH:$nodejs_path npm install "babel-core@>=6.0.20" --save --production #sudo -u $app env PATH=$PATH:$nodejs_path npm install "eslint@>=5.0.0" --save --production sudo -u $app env PATH=$PATH:$nodejs_path npm install --production sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix From 76fd419cba9d62470ef72e9451597850869b826d Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 02:52:15 +0100 Subject: [PATCH 09/37] back to 2.0.0-beta.17 --- README.md | 2 +- manifest.json | 2 +- scripts/install | 3 +-- scripts/upgrade | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4631eb7..d6cf300 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ An open source, modern and powerful wiki app built on Node.js, Git and Markdown **Wiki.js is still under development, all features not already implemented.** -**Shipped version:** 2.0.0-beta.17 +**Shipped version:** 2.0.0-beta.16 ## Licence diff --git a/manifest.json b/manifest.json index ca8cffa..40a037b 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "An open source, modern and powerful wiki app built on Node.js, Git and Markdown for YunoHost.", "fr": "Un wiki moderne et open source propulsé Node.js, Git et Markdown pour YunoHost." }, - "version": "2.0.0-beta.17~ynh1", + "version": "2.0.0-beta.16~ynh1", "url": "https://wiki.js.org/", "license": "AGPL-3.0-or-later", "maintainer": { diff --git a/scripts/install b/scripts/install index 4ad5101..2341724 100644 --- a/scripts/install +++ b/scripts/install @@ -134,7 +134,7 @@ ynh_app_setting_set $app final_path $final_path git clone https://github.com/Requarks/wiki "$final_path" pushd $final_path - git checkout 2.0.0-beta.17 + git checkout 2.0.0-beta.16 popd #================================================= @@ -191,7 +191,6 @@ pushd $final_path sudo -u $app env PATH=$PATH:$nodejs_path npm install "graphql@^0.13.0" --save --production sudo -u $app env PATH=$PATH:$nodejs_path npm install "acorn@^6.0.0" --save --production sudo -u $app env PATH=$PATH:$nodejs_path npm install "babel-core@>=6.0.20" --save --production - #sudo -u $app env PATH=$PATH:$nodejs_path npm install "eslint@>=5.0.0" --save --production sudo -u $app env PATH=$PATH:$nodejs_path npm install --production sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix sudo -u $app env PATH=$PATH:$nodejs_path npm run build diff --git a/scripts/upgrade b/scripts/upgrade index 8bb9440..287060c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -88,7 +88,7 @@ path_url=$(ynh_normalize_url_path $path_url) pushd $final_path git pull - git checkout 2.0.0-beta.17 + git checkout 2.0.0-beta.16 popd #================================================= From 63daad70ea94578e481db60e60ed895071f7acb6 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 02:58:09 +0100 Subject: [PATCH 10/37] 2.0.0-beta.15 --- README.md | 2 +- manifest.json | 2 +- scripts/install | 2 +- scripts/upgrade | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d6cf300..0f65d98 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ An open source, modern and powerful wiki app built on Node.js, Git and Markdown **Wiki.js is still under development, all features not already implemented.** -**Shipped version:** 2.0.0-beta.16 +**Shipped version:** 2.0.0-beta.15 ## Licence diff --git a/manifest.json b/manifest.json index 40a037b..efac860 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "An open source, modern and powerful wiki app built on Node.js, Git and Markdown for YunoHost.", "fr": "Un wiki moderne et open source propulsé Node.js, Git et Markdown pour YunoHost." }, - "version": "2.0.0-beta.16~ynh1", + "version": "2.0.0-beta.15~ynh1", "url": "https://wiki.js.org/", "license": "AGPL-3.0-or-later", "maintainer": { diff --git a/scripts/install b/scripts/install index 2341724..a4fe2cb 100644 --- a/scripts/install +++ b/scripts/install @@ -134,7 +134,7 @@ ynh_app_setting_set $app final_path $final_path git clone https://github.com/Requarks/wiki "$final_path" pushd $final_path - git checkout 2.0.0-beta.16 + git checkout 2.0.0-beta.15 popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 287060c..dd3e2d6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -88,7 +88,7 @@ path_url=$(ynh_normalize_url_path $path_url) pushd $final_path git pull - git checkout 2.0.0-beta.16 + git checkout 2.0.0-beta.15 popd #================================================= From 04f96a0dd2ee1cc08c839e3d5b56273ec12be21d Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 05:12:39 +0100 Subject: [PATCH 11/37] with yarn --- README.md | 2 +- manifest.json | 2 +- scripts/install | 15 ++++++++------- scripts/remove | 1 + scripts/restore | 6 +++++- scripts/upgrade | 12 +++++++----- 6 files changed, 23 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 0f65d98..1254395 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ An open source, modern and powerful wiki app built on Node.js, Git and Markdown **Wiki.js is still under development, all features not already implemented.** -**Shipped version:** 2.0.0-beta.15 +**Shipped version:** 2.0.0-beta ## Licence diff --git a/manifest.json b/manifest.json index efac860..ddb102d 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "An open source, modern and powerful wiki app built on Node.js, Git and Markdown for YunoHost.", "fr": "Un wiki moderne et open source propulsé Node.js, Git et Markdown pour YunoHost." }, - "version": "2.0.0-beta.15~ynh1", + "version": "2.0.0-beta~ynh1", "url": "https://wiki.js.org/", "license": "AGPL-3.0-or-later", "maintainer": { diff --git a/scripts/install b/scripts/install index a4fe2cb..4adeb69 100644 --- a/scripts/install +++ b/scripts/install @@ -97,9 +97,14 @@ ynh_app_setting_set $app port $port ### - As well as the section "REINSTALL DEPENDENCIES" in the restore script ### - And the section "UPGRADE DEPENDENCIES" in the upgrade script -ynh_install_app_dependencies redis-server postgresql postgresql-contrib ynh_install_nodejs 10 +curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - +echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list + +ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn + + #================================================= # CREATE A POSTGRESQL DATABASE #================================================= @@ -134,7 +139,7 @@ ynh_app_setting_set $app final_path $final_path git clone https://github.com/Requarks/wiki "$final_path" pushd $final_path - git checkout 2.0.0-beta.15 + git checkout popd #================================================= @@ -188,11 +193,7 @@ chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs - sudo -u $app env PATH=$PATH:$nodejs_path npm install "graphql@^0.13.0" --save --production - sudo -u $app env PATH=$PATH:$nodejs_path npm install "acorn@^6.0.0" --save --production - sudo -u $app env PATH=$PATH:$nodejs_path npm install "babel-core@>=6.0.20" --save --production - sudo -u $app env PATH=$PATH:$nodejs_path npm install --production - sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix + sudo -u $app env PATH=$PATH:$nodejs_path yarn install sudo -u $app env PATH=$PATH:$nodejs_path npm run build popd diff --git a/scripts/remove b/scripts/remove index 9f2ab84..d49e468 100644 --- a/scripts/remove +++ b/scripts/remove @@ -57,6 +57,7 @@ ynh_psql_remove_db "$db_name" "$db_name" ynh_remove_app_dependencies ynh_use_nodejs ynh_remove_nodejs +rm -rf "/etc/apt/sources.list.d/yarn.list" #================================================= # REMOVE APP MAIN DIR diff --git a/scripts/restore b/scripts/restore index 24408ab..804658a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -92,9 +92,13 @@ chown -R "$app":"$app" "$final_path" #================================================= # Define and install dependencies -ynh_install_app_dependencies redis-server postgresql postgresql-contrib ynh_install_nodejs 10 +curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - +echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list + +ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn + #================================================= # RESTORE SYSTEMD #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index dd3e2d6..29d1780 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -88,7 +88,7 @@ path_url=$(ynh_normalize_url_path $path_url) pushd $final_path git pull - git checkout 2.0.0-beta.15 + git checkout popd #================================================= @@ -102,9 +102,13 @@ ynh_add_nginx_config # UPGRADE DEPENDENCIES #================================================= -ynh_install_app_dependencies redis-server postgresql postgresql-contrib ynh_install_nodejs 10 +curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - +echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list + +ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn + #================================================= # CREATE DEDICATED USER #================================================= @@ -129,9 +133,7 @@ chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs - sudo -u $app env PATH=$PATH:$nodejs_path npm update --production - sudo -u $app env PATH=$PATH:$nodejs_path npm install --production - sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix + sudo -u $app env PATH=$PATH:$nodejs_path yarn install sudo -u $app env PATH=$PATH:$nodejs_path npm run build popd From ef9b3c15f4a516e4194ea9d7f9c7a035afc9b1ae Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 05:29:13 +0100 Subject: [PATCH 12/37] Cleanup --- scripts/install | 7 +++---- scripts/restore | 6 +++--- scripts/upgrade | 6 +++--- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/scripts/install b/scripts/install index 4adeb69..17341a5 100644 --- a/scripts/install +++ b/scripts/install @@ -97,13 +97,12 @@ ynh_app_setting_set $app port $port ### - As well as the section "REINSTALL DEPENDENCIES" in the restore script ### - And the section "UPGRADE DEPENDENCIES" in the upgrade script -ynh_install_nodejs 10 - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list -ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn +ynh_install_nodejs 10 +ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn #================================================= # CREATE A POSTGRESQL DATABASE @@ -336,4 +335,4 @@ systemctl reload nginx # START SERVICE #================================================= -ynh_systemd_action --action=start --service_name=$app --line_match="Browse to http://localhost:" +ynh_systemd_action --action=start --service_name=$app diff --git a/scripts/restore b/scripts/restore index 804658a..a4bec38 100644 --- a/scripts/restore +++ b/scripts/restore @@ -92,11 +92,11 @@ chown -R "$app":"$app" "$final_path" #================================================= # Define and install dependencies -ynh_install_nodejs 10 - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list +ynh_install_nodejs 10 + ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn #================================================= @@ -145,4 +145,4 @@ chown -R "$app":"$app" "/var/log/$app" # START SERVICE #================================================= -ynh_systemd_action --action=start --service_name=$app --line_match="Browse to http://localhost:" +ynh_systemd_action --action=start --service_name=$app diff --git a/scripts/upgrade b/scripts/upgrade index 29d1780..43b9328 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -102,11 +102,11 @@ ynh_add_nginx_config # UPGRADE DEPENDENCIES #================================================= -ynh_install_nodejs 10 - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list +ynh_install_nodejs 10 + ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn #================================================= @@ -203,4 +203,4 @@ systemctl reload nginx # START SERVICE #================================================= -ynh_systemd_action --action=start --service_name=$app --line_match="Browse to http://localhost:" +ynh_systemd_action --action=start --service_name=$app From bc165af31a907b2c25df1f6d3480dae7b8de47cc Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 05:49:37 +0100 Subject: [PATCH 13/37] 2.0.0-beta.15 --- README.md | 2 +- manifest.json | 2 +- scripts/install | 2 +- scripts/upgrade | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1254395..0f65d98 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ An open source, modern and powerful wiki app built on Node.js, Git and Markdown **Wiki.js is still under development, all features not already implemented.** -**Shipped version:** 2.0.0-beta +**Shipped version:** 2.0.0-beta.15 ## Licence diff --git a/manifest.json b/manifest.json index ddb102d..efac860 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "An open source, modern and powerful wiki app built on Node.js, Git and Markdown for YunoHost.", "fr": "Un wiki moderne et open source propulsé Node.js, Git et Markdown pour YunoHost." }, - "version": "2.0.0-beta~ynh1", + "version": "2.0.0-beta.15~ynh1", "url": "https://wiki.js.org/", "license": "AGPL-3.0-or-later", "maintainer": { diff --git a/scripts/install b/scripts/install index 17341a5..5fc49f9 100644 --- a/scripts/install +++ b/scripts/install @@ -138,7 +138,7 @@ ynh_app_setting_set $app final_path $final_path git clone https://github.com/Requarks/wiki "$final_path" pushd $final_path - git checkout + git checkout tags/2.0.0-beta.15 popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 43b9328..4efb517 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -88,7 +88,7 @@ path_url=$(ynh_normalize_url_path $path_url) pushd $final_path git pull - git checkout + git checkout tags/2.0.0-beta.15 popd #================================================= From c7f849621ce6e7c2b8b5d324b902ece0771b4f54 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 06:18:30 +0100 Subject: [PATCH 14/37] Removing Yarn --- scripts/install | 8 +++----- scripts/remove | 1 - scripts/restore | 4 +--- scripts/upgrade | 7 ++----- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/scripts/install b/scripts/install index 5fc49f9..ee20d52 100644 --- a/scripts/install +++ b/scripts/install @@ -16,6 +16,7 @@ source /usr/share/yunohost/helpers ynh_clean_setup () { ### Remove this function if there's nothing to clean before calling the remove script. + read -p "Press any key..." ynh_clean_check_starting } # Exit if an error occurs during the execution of the script @@ -97,12 +98,9 @@ ynh_app_setting_set $app port $port ### - As well as the section "REINSTALL DEPENDENCIES" in the restore script ### - And the section "UPGRADE DEPENDENCIES" in the upgrade script -curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - -echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list - ynh_install_nodejs 10 -ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn +ynh_install_app_dependencies redis-server postgresql postgresql-contrib #================================================= # CREATE A POSTGRESQL DATABASE @@ -192,7 +190,7 @@ chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs - sudo -u $app env PATH=$PATH:$nodejs_path yarn install + sudo -u $app env PATH=$PATH:$nodejs_path npm install sudo -u $app env PATH=$PATH:$nodejs_path npm run build popd diff --git a/scripts/remove b/scripts/remove index d49e468..9f2ab84 100644 --- a/scripts/remove +++ b/scripts/remove @@ -57,7 +57,6 @@ ynh_psql_remove_db "$db_name" "$db_name" ynh_remove_app_dependencies ynh_use_nodejs ynh_remove_nodejs -rm -rf "/etc/apt/sources.list.d/yarn.list" #================================================= # REMOVE APP MAIN DIR diff --git a/scripts/restore b/scripts/restore index a4bec38..0d0c4d8 100644 --- a/scripts/restore +++ b/scripts/restore @@ -92,12 +92,10 @@ chown -R "$app":"$app" "$final_path" #================================================= # Define and install dependencies -curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - -echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list ynh_install_nodejs 10 -ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn +ynh_install_app_dependencies redis-server postgresql postgresql-contrib #================================================= # RESTORE SYSTEMD diff --git a/scripts/upgrade b/scripts/upgrade index 4efb517..42da3b5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -102,12 +102,9 @@ ynh_add_nginx_config # UPGRADE DEPENDENCIES #================================================= -curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - -echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list - ynh_install_nodejs 10 -ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn +ynh_install_app_dependencies redis-server postgresql postgresql-contrib #================================================= # CREATE DEDICATED USER @@ -133,7 +130,7 @@ chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs - sudo -u $app env PATH=$PATH:$nodejs_path yarn install + sudo -u $app env PATH=$PATH:$nodejs_path npm install sudo -u $app env PATH=$PATH:$nodejs_path npm run build popd From c4ec6e63fe831abb34933617d6d88a04aaba6a6e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 07:17:53 +0100 Subject: [PATCH 15/37] 2.0.0-beta.11 --- README.md | 2 +- manifest.json | 2 +- scripts/install | 6 +++++- scripts/upgrade | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0f65d98..6afb824 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ An open source, modern and powerful wiki app built on Node.js, Git and Markdown **Wiki.js is still under development, all features not already implemented.** -**Shipped version:** 2.0.0-beta.15 +**Shipped version:** 2.0.0-beta.11 ## Licence diff --git a/manifest.json b/manifest.json index efac860..1aa8d07 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "An open source, modern and powerful wiki app built on Node.js, Git and Markdown for YunoHost.", "fr": "Un wiki moderne et open source propulsé Node.js, Git et Markdown pour YunoHost." }, - "version": "2.0.0-beta.15~ynh1", + "version": "2.0.0-beta.11~ynh1", "url": "https://wiki.js.org/", "license": "AGPL-3.0-or-later", "maintainer": { diff --git a/scripts/install b/scripts/install index ee20d52..e61e262 100644 --- a/scripts/install +++ b/scripts/install @@ -136,7 +136,7 @@ ynh_app_setting_set $app final_path $final_path git clone https://github.com/Requarks/wiki "$final_path" pushd $final_path - git checkout tags/2.0.0-beta.15 + git checkout tags/2.0.0-beta.11 popd #================================================= @@ -190,7 +190,11 @@ chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs + sudo -u $app env PATH=$PATH:$nodejs_path npm install "acorn@^6.0.0" --save + sudo -u $app env PATH=$PATH:$nodejs_path npm install "babel-core@>=6.0.20" --save + sudo -u $app env PATH=$PATH:$nodejs_path npm install "graphql@^0.13.0" --save sudo -u $app env PATH=$PATH:$nodejs_path npm install + sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix sudo -u $app env PATH=$PATH:$nodejs_path npm run build popd diff --git a/scripts/upgrade b/scripts/upgrade index 42da3b5..d5aa727 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -88,7 +88,7 @@ path_url=$(ynh_normalize_url_path $path_url) pushd $final_path git pull - git checkout tags/2.0.0-beta.15 + git checkout tags/2.0.0-beta.11 popd #================================================= From 313af25a52c3e560d0bd9dd160441d23888bc9d2 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 07:28:25 +0100 Subject: [PATCH 16/37] 2.0.0-beta.12 --- README.md | 2 +- manifest.json | 2 +- scripts/install | 2 +- scripts/upgrade | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6afb824..6df7370 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ An open source, modern and powerful wiki app built on Node.js, Git and Markdown **Wiki.js is still under development, all features not already implemented.** -**Shipped version:** 2.0.0-beta.11 +**Shipped version:** 2.0.0-beta.12 ## Licence diff --git a/manifest.json b/manifest.json index 1aa8d07..82724ab 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "An open source, modern and powerful wiki app built on Node.js, Git and Markdown for YunoHost.", "fr": "Un wiki moderne et open source propulsé Node.js, Git et Markdown pour YunoHost." }, - "version": "2.0.0-beta.11~ynh1", + "version": "2.0.0-beta.12~ynh1", "url": "https://wiki.js.org/", "license": "AGPL-3.0-or-later", "maintainer": { diff --git a/scripts/install b/scripts/install index e61e262..67a809c 100644 --- a/scripts/install +++ b/scripts/install @@ -136,7 +136,7 @@ ynh_app_setting_set $app final_path $final_path git clone https://github.com/Requarks/wiki "$final_path" pushd $final_path - git checkout tags/2.0.0-beta.11 + git checkout tags/2.0.0-beta.12 popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index d5aa727..08b616f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -88,7 +88,7 @@ path_url=$(ynh_normalize_url_path $path_url) pushd $final_path git pull - git checkout tags/2.0.0-beta.11 + git checkout tags/2.0.0-beta.12 popd #================================================= From d86f0565426381ce0f3ccd4880d496b7ec47efb4 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 08:17:26 +0100 Subject: [PATCH 17/37] remove run --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 67a809c..dc1f93e 100644 --- a/scripts/install +++ b/scripts/install @@ -193,9 +193,10 @@ pushd $final_path sudo -u $app env PATH=$PATH:$nodejs_path npm install "acorn@^6.0.0" --save sudo -u $app env PATH=$PATH:$nodejs_path npm install "babel-core@>=6.0.20" --save sudo -u $app env PATH=$PATH:$nodejs_path npm install "graphql@^0.13.0" --save + sudo -u $app env PATH=$PATH:$nodejs_path npm install "eslint@>=5.0.0" --save sudo -u $app env PATH=$PATH:$nodejs_path npm install sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix - sudo -u $app env PATH=$PATH:$nodejs_path npm run build + #sudo -u $app env PATH=$PATH:$nodejs_path npm run build popd From 9fd8edc2e3100af42dbd8272fbd965e7ea34d961 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 08:23:56 +0100 Subject: [PATCH 18/37] enable run build --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index dc1f93e..d450ac3 100644 --- a/scripts/install +++ b/scripts/install @@ -196,7 +196,7 @@ pushd $final_path sudo -u $app env PATH=$PATH:$nodejs_path npm install "eslint@>=5.0.0" --save sudo -u $app env PATH=$PATH:$nodejs_path npm install sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix - #sudo -u $app env PATH=$PATH:$nodejs_path npm run build + sudo -u $app env PATH=$PATH:$nodejs_path npm run build popd From cb156914b666f16d84fe9e22feefcfb5e33ddacb Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 08:28:45 +0100 Subject: [PATCH 19/37] activating yarn --- scripts/install | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index d450ac3..01fa605 100644 --- a/scripts/install +++ b/scripts/install @@ -190,12 +190,13 @@ chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs - sudo -u $app env PATH=$PATH:$nodejs_path npm install "acorn@^6.0.0" --save - sudo -u $app env PATH=$PATH:$nodejs_path npm install "babel-core@>=6.0.20" --save - sudo -u $app env PATH=$PATH:$nodejs_path npm install "graphql@^0.13.0" --save - sudo -u $app env PATH=$PATH:$nodejs_path npm install "eslint@>=5.0.0" --save - sudo -u $app env PATH=$PATH:$nodejs_path npm install - sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix + #sudo -u $app env PATH=$PATH:$nodejs_path npm install "acorn@^6.0.0" --save + #sudo -u $app env PATH=$PATH:$nodejs_path npm install "babel-core@>=6.0.20" --save + #sudo -u $app env PATH=$PATH:$nodejs_path npm install "graphql@^0.13.0" --save + #sudo -u $app env PATH=$PATH:$nodejs_path npm install "eslint@>=5.0.0" --save + #sudo -u $app env PATH=$PATH:$nodejs_path npm install + #sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix + sudo -u $app env PATH=$PATH:$nodejs_path yarn install sudo -u $app env PATH=$PATH:$nodejs_path npm run build popd From 4b1aa742a285444ce484016ea952a9061e8e46ef Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 08:45:13 +0100 Subject: [PATCH 20/37] using yarn --- scripts/install | 11 ++++------- scripts/remove | 2 ++ scripts/restore | 5 ++++- scripts/upgrade | 5 ++++- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/scripts/install b/scripts/install index 01fa605..33c4fff 100644 --- a/scripts/install +++ b/scripts/install @@ -98,9 +98,12 @@ ynh_app_setting_set $app port $port ### - As well as the section "REINSTALL DEPENDENCIES" in the restore script ### - And the section "UPGRADE DEPENDENCIES" in the upgrade script +curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - +echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list + ynh_install_nodejs 10 -ynh_install_app_dependencies redis-server postgresql postgresql-contrib +ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn #================================================= # CREATE A POSTGRESQL DATABASE @@ -190,12 +193,6 @@ chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs - #sudo -u $app env PATH=$PATH:$nodejs_path npm install "acorn@^6.0.0" --save - #sudo -u $app env PATH=$PATH:$nodejs_path npm install "babel-core@>=6.0.20" --save - #sudo -u $app env PATH=$PATH:$nodejs_path npm install "graphql@^0.13.0" --save - #sudo -u $app env PATH=$PATH:$nodejs_path npm install "eslint@>=5.0.0" --save - #sudo -u $app env PATH=$PATH:$nodejs_path npm install - #sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix sudo -u $app env PATH=$PATH:$nodejs_path yarn install sudo -u $app env PATH=$PATH:$nodejs_path npm run build popd diff --git a/scripts/remove b/scripts/remove index 9f2ab84..2b6f6a4 100644 --- a/scripts/remove +++ b/scripts/remove @@ -58,6 +58,8 @@ ynh_remove_app_dependencies ynh_use_nodejs ynh_remove_nodejs +rm -rf "/etc/apt/sources.list.d/yarn.list" + #================================================= # REMOVE APP MAIN DIR #================================================= diff --git a/scripts/restore b/scripts/restore index 0d0c4d8..35a175a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -93,9 +93,12 @@ chown -R "$app":"$app" "$final_path" # Define and install dependencies +curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - +echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list + ynh_install_nodejs 10 -ynh_install_app_dependencies redis-server postgresql postgresql-contrib +ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn #================================================= # RESTORE SYSTEMD diff --git a/scripts/upgrade b/scripts/upgrade index 08b616f..2080e5a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -102,9 +102,12 @@ ynh_add_nginx_config # UPGRADE DEPENDENCIES #================================================= +curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - +echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list + ynh_install_nodejs 10 -ynh_install_app_dependencies redis-server postgresql postgresql-contrib +ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn #================================================= # CREATE DEDICATED USER From c4857c776a6553162eb27272735a643d3def526e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 08:45:45 +0100 Subject: [PATCH 21/37] npm to yarn --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 2080e5a..d57e5e2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -133,7 +133,7 @@ chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs - sudo -u $app env PATH=$PATH:$nodejs_path npm install + sudo -u $app env PATH=$PATH:$nodejs_path yarn install sudo -u $app env PATH=$PATH:$nodejs_path npm run build popd From 4984aae525bee93ded574404ca9b19d4ff6a807f Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 08:54:59 +0100 Subject: [PATCH 22/37] desactivate checkout 2.0.0-beta.12 --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 33c4fff..ca92ca8 100644 --- a/scripts/install +++ b/scripts/install @@ -139,7 +139,7 @@ ynh_app_setting_set $app final_path $final_path git clone https://github.com/Requarks/wiki "$final_path" pushd $final_path - git checkout tags/2.0.0-beta.12 + #git checkout tags/2.0.0-beta.12 popd #================================================= From 9f082b4da61c09b15f8c78dbcbf1eae49c9cf84e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 09:01:56 +0100 Subject: [PATCH 23/37] 2.0.0-beta.12 --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index ca92ca8..33c4fff 100644 --- a/scripts/install +++ b/scripts/install @@ -139,7 +139,7 @@ ynh_app_setting_set $app final_path $final_path git clone https://github.com/Requarks/wiki "$final_path" pushd $final_path - #git checkout tags/2.0.0-beta.12 + git checkout tags/2.0.0-beta.12 popd #================================================= From 9b72c9fdc863b322d627aa7173c0abf69eea6729 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 09:11:40 +0100 Subject: [PATCH 24/37] 2.0.0-beta.13 --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 33c4fff..f694566 100644 --- a/scripts/install +++ b/scripts/install @@ -139,7 +139,7 @@ ynh_app_setting_set $app final_path $final_path git clone https://github.com/Requarks/wiki "$final_path" pushd $final_path - git checkout tags/2.0.0-beta.12 + git checkout "tags/2.0.0-beta.12" popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index d57e5e2..b979fa2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -88,7 +88,7 @@ path_url=$(ynh_normalize_url_path $path_url) pushd $final_path git pull - git checkout tags/2.0.0-beta.12 + git checkout "tags/2.0.0-beta.12" popd #================================================= From 11b9dcfb676a048cbb3a66809c3077d979a3f283 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 09:23:48 +0100 Subject: [PATCH 25/37] force pull for upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index b979fa2..85e7d4d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -87,7 +87,7 @@ path_url=$(ynh_normalize_url_path $path_url) #ynh_setup_source "$final_path" pushd $final_path - git pull + git pull --force git checkout "tags/2.0.0-beta.12" popd From df762e19c8c0d566cb6704aac71873cd1d407078 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 09:34:40 +0100 Subject: [PATCH 26/37] 2.0.0-beta.13 --- README.md | 2 +- manifest.json | 2 +- scripts/install | 2 +- scripts/upgrade | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6df7370..b993fcb 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ An open source, modern and powerful wiki app built on Node.js, Git and Markdown **Wiki.js is still under development, all features not already implemented.** -**Shipped version:** 2.0.0-beta.12 +**Shipped version:** 2.0.0-beta.13 ## Licence diff --git a/manifest.json b/manifest.json index 82724ab..a58ba38 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "An open source, modern and powerful wiki app built on Node.js, Git and Markdown for YunoHost.", "fr": "Un wiki moderne et open source propulsé Node.js, Git et Markdown pour YunoHost." }, - "version": "2.0.0-beta.12~ynh1", + "version": "2.0.0-beta.13~ynh1", "url": "https://wiki.js.org/", "license": "AGPL-3.0-or-later", "maintainer": { diff --git a/scripts/install b/scripts/install index f694566..88e19c1 100644 --- a/scripts/install +++ b/scripts/install @@ -139,7 +139,7 @@ ynh_app_setting_set $app final_path $final_path git clone https://github.com/Requarks/wiki "$final_path" pushd $final_path - git checkout "tags/2.0.0-beta.12" + git checkout "tags/2.0.0-beta.13" popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 85e7d4d..bef38e1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -88,7 +88,7 @@ path_url=$(ynh_normalize_url_path $path_url) pushd $final_path git pull --force - git checkout "tags/2.0.0-beta.12" + git checkout "tags/2.0.0-beta.13" popd #================================================= From 0b0ae96ce3733c2a160be401337eb1a7b18ab338 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 09:42:59 +0100 Subject: [PATCH 27/37] 2.0.0-beta.14 --- README.md | 2 +- manifest.json | 2 +- scripts/install | 2 +- scripts/upgrade | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b993fcb..4ed20cf 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ An open source, modern and powerful wiki app built on Node.js, Git and Markdown **Wiki.js is still under development, all features not already implemented.** -**Shipped version:** 2.0.0-beta.13 +**Shipped version:** 2.0.0-beta.14 ## Licence diff --git a/manifest.json b/manifest.json index a58ba38..98b6bb5 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "An open source, modern and powerful wiki app built on Node.js, Git and Markdown for YunoHost.", "fr": "Un wiki moderne et open source propulsé Node.js, Git et Markdown pour YunoHost." }, - "version": "2.0.0-beta.13~ynh1", + "version": "2.0.0-beta.14~ynh1", "url": "https://wiki.js.org/", "license": "AGPL-3.0-or-later", "maintainer": { diff --git a/scripts/install b/scripts/install index 88e19c1..3cf9a69 100644 --- a/scripts/install +++ b/scripts/install @@ -139,7 +139,7 @@ ynh_app_setting_set $app final_path $final_path git clone https://github.com/Requarks/wiki "$final_path" pushd $final_path - git checkout "tags/2.0.0-beta.13" + git checkout "tags/2.0.0-beta.14" popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index bef38e1..3bc3f53 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -88,7 +88,7 @@ path_url=$(ynh_normalize_url_path $path_url) pushd $final_path git pull --force - git checkout "tags/2.0.0-beta.13" + git checkout "tags/2.0.0-beta.14" popd #================================================= From ee0fb39652db2b8b58fe9f105df0e54883fdc54e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 09:55:05 +0100 Subject: [PATCH 28/37] 2.0.0-beta.13 --- README.md | 2 +- manifest.json | 2 +- scripts/install | 2 +- scripts/upgrade | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4ed20cf..b993fcb 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ An open source, modern and powerful wiki app built on Node.js, Git and Markdown **Wiki.js is still under development, all features not already implemented.** -**Shipped version:** 2.0.0-beta.14 +**Shipped version:** 2.0.0-beta.13 ## Licence diff --git a/manifest.json b/manifest.json index 98b6bb5..a58ba38 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "An open source, modern and powerful wiki app built on Node.js, Git and Markdown for YunoHost.", "fr": "Un wiki moderne et open source propulsé Node.js, Git et Markdown pour YunoHost." }, - "version": "2.0.0-beta.14~ynh1", + "version": "2.0.0-beta.13~ynh1", "url": "https://wiki.js.org/", "license": "AGPL-3.0-or-later", "maintainer": { diff --git a/scripts/install b/scripts/install index 3cf9a69..88e19c1 100644 --- a/scripts/install +++ b/scripts/install @@ -139,7 +139,7 @@ ynh_app_setting_set $app final_path $final_path git clone https://github.com/Requarks/wiki "$final_path" pushd $final_path - git checkout "tags/2.0.0-beta.14" + git checkout "tags/2.0.0-beta.13" popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 3bc3f53..bef38e1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -88,7 +88,7 @@ path_url=$(ynh_normalize_url_path $path_url) pushd $final_path git pull --force - git checkout "tags/2.0.0-beta.14" + git checkout "tags/2.0.0-beta.13" popd #================================================= From 5af020bb78aa324c67b3dda577cb8d4213410e4b Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 10:02:53 +0100 Subject: [PATCH 29/37] 2.0.0-beta.17 --- README.md | 2 +- manifest.json | 2 +- scripts/install | 2 +- scripts/upgrade | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b993fcb..4631eb7 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ An open source, modern and powerful wiki app built on Node.js, Git and Markdown **Wiki.js is still under development, all features not already implemented.** -**Shipped version:** 2.0.0-beta.13 +**Shipped version:** 2.0.0-beta.17 ## Licence diff --git a/manifest.json b/manifest.json index a58ba38..ca8cffa 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "An open source, modern and powerful wiki app built on Node.js, Git and Markdown for YunoHost.", "fr": "Un wiki moderne et open source propulsé Node.js, Git et Markdown pour YunoHost." }, - "version": "2.0.0-beta.13~ynh1", + "version": "2.0.0-beta.17~ynh1", "url": "https://wiki.js.org/", "license": "AGPL-3.0-or-later", "maintainer": { diff --git a/scripts/install b/scripts/install index 88e19c1..dad57ce 100644 --- a/scripts/install +++ b/scripts/install @@ -139,7 +139,7 @@ ynh_app_setting_set $app final_path $final_path git clone https://github.com/Requarks/wiki "$final_path" pushd $final_path - git checkout "tags/2.0.0-beta.13" + git checkout "tags/2.0.0-beta.17" popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index bef38e1..4abb64f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -88,7 +88,7 @@ path_url=$(ynh_normalize_url_path $path_url) pushd $final_path git pull --force - git checkout "tags/2.0.0-beta.13" + git checkout "tags/2.0.0-beta.17" popd #================================================= From 03e065075ef77358a116e2fe781b5aab0d9bd582 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 10:11:58 +0100 Subject: [PATCH 30/37] 2.0.0-beta.13 --- README.md | 2 +- manifest.json | 2 +- scripts/install | 2 +- scripts/upgrade | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4631eb7..b993fcb 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ An open source, modern and powerful wiki app built on Node.js, Git and Markdown **Wiki.js is still under development, all features not already implemented.** -**Shipped version:** 2.0.0-beta.17 +**Shipped version:** 2.0.0-beta.13 ## Licence diff --git a/manifest.json b/manifest.json index ca8cffa..a58ba38 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "An open source, modern and powerful wiki app built on Node.js, Git and Markdown for YunoHost.", "fr": "Un wiki moderne et open source propulsé Node.js, Git et Markdown pour YunoHost." }, - "version": "2.0.0-beta.17~ynh1", + "version": "2.0.0-beta.13~ynh1", "url": "https://wiki.js.org/", "license": "AGPL-3.0-or-later", "maintainer": { diff --git a/scripts/install b/scripts/install index dad57ce..88e19c1 100644 --- a/scripts/install +++ b/scripts/install @@ -139,7 +139,7 @@ ynh_app_setting_set $app final_path $final_path git clone https://github.com/Requarks/wiki "$final_path" pushd $final_path - git checkout "tags/2.0.0-beta.17" + git checkout "tags/2.0.0-beta.13" popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 4abb64f..bef38e1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -88,7 +88,7 @@ path_url=$(ynh_normalize_url_path $path_url) pushd $final_path git pull --force - git checkout "tags/2.0.0-beta.17" + git checkout "tags/2.0.0-beta.13" popd #================================================= From ad1334a88e66db5b92133d6bbd891e263fb60c27 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 11:18:56 +0100 Subject: [PATCH 31/37] fix service startup during install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 88e19c1..ba389b5 100644 --- a/scripts/install +++ b/scripts/install @@ -336,4 +336,4 @@ systemctl reload nginx # START SERVICE #================================================= -ynh_systemd_action --action=start --service_name=$app +ynh_systemd_action --action=start --service_name=$app --line_match="complete setup" From bcc67bfb4c82bdf3d5758d2a2539b57e80fbbf01 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 11:46:33 +0100 Subject: [PATCH 32/37] remove read --- scripts/install | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/install b/scripts/install index ba389b5..8d7192e 100644 --- a/scripts/install +++ b/scripts/install @@ -16,7 +16,6 @@ source /usr/share/yunohost/helpers ynh_clean_setup () { ### Remove this function if there's nothing to clean before calling the remove script. - read -p "Press any key..." ynh_clean_check_starting } # Exit if an error occurs during the execution of the script From f4917a67b44b0b1a9c7f8dbf09316a1c38c05092 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 12:26:00 +0100 Subject: [PATCH 33/37] manage upgrade and restore --- scripts/restore | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index 35a175a..d6a26ec 100644 --- a/scripts/restore +++ b/scripts/restore @@ -146,4 +146,4 @@ chown -R "$app":"$app" "/var/log/$app" # START SERVICE #================================================= -ynh_systemd_action --action=start --service_name=$app +ynh_systemd_action --action=start --service_name=$app --line_match="Redis connection: [ OK ]" diff --git a/scripts/upgrade b/scripts/upgrade index bef38e1..98c3f87 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -203,4 +203,4 @@ systemctl reload nginx # START SERVICE #================================================= -ynh_systemd_action --action=start --service_name=$app +ynh_systemd_action --action=start --service_name=$app --line_match="Redis connection: [ OK ]" From d5e0b86fc76d519e5a4795487c61d6ad2b5a8a10 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 3 Feb 2019 23:34:48 +0100 Subject: [PATCH 34/37] Fix services start 2 --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 8d7192e..bfaa851 100644 --- a/scripts/install +++ b/scripts/install @@ -335,4 +335,4 @@ systemctl reload nginx # START SERVICE #================================================= -ynh_systemd_action --action=start --service_name=$app --line_match="complete setup" +ynh_systemd_action --action=start --service_name=$app --line_match="Redis connection:" diff --git a/scripts/restore b/scripts/restore index d6a26ec..9541981 100644 --- a/scripts/restore +++ b/scripts/restore @@ -146,4 +146,4 @@ chown -R "$app":"$app" "/var/log/$app" # START SERVICE #================================================= -ynh_systemd_action --action=start --service_name=$app --line_match="Redis connection: [ OK ]" +ynh_systemd_action --action=start --service_name=$app --line_match="Redis connection:" diff --git a/scripts/upgrade b/scripts/upgrade index 98c3f87..55357b7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -203,4 +203,4 @@ systemctl reload nginx # START SERVICE #================================================= -ynh_systemd_action --action=start --service_name=$app --line_match="Redis connection: [ OK ]" +ynh_systemd_action --action=start --service_name=$app --line_match="Redis connection:" From 5cc1b3184da980b8715aa7510d13a651c65ef480 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 4 Feb 2019 00:26:41 +0100 Subject: [PATCH 35/37] fix upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 55357b7..cd16c4a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -87,7 +87,7 @@ path_url=$(ynh_normalize_url_path $path_url) #ynh_setup_source "$final_path" pushd $final_path - git pull --force + git pull git checkout "tags/2.0.0-beta.13" popd From b92b58cf66627ed744731c57fa91a155b4bf3336 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 4 Feb 2019 01:10:01 +0100 Subject: [PATCH 36/37] Fix upgrade --- scripts/install | 2 +- scripts/upgrade | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index bfaa851..38032f0 100644 --- a/scripts/install +++ b/scripts/install @@ -138,7 +138,7 @@ ynh_app_setting_set $app final_path $final_path git clone https://github.com/Requarks/wiki "$final_path" pushd $final_path - git checkout "tags/2.0.0-beta.13" + git checkout "tags/2.0.0-beta.13" --quiet popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index cd16c4a..e089474 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -87,8 +87,8 @@ path_url=$(ynh_normalize_url_path $path_url) #ynh_setup_source "$final_path" pushd $final_path - git pull - git checkout "tags/2.0.0-beta.13" + git fetch origin + git checkout "tags/2.0.0-beta.13" --quiet popd #================================================= From 4837474ab5702341ee196541253ca20b91e58e5e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 4 Feb 2019 01:37:23 +0100 Subject: [PATCH 37/37] Fix upgrade --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index e089474..bbb5706 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,6 +23,7 @@ is_public=$(ynh_app_setting_get $app is_public) final_path=$(ynh_app_setting_get $app final_path) #language=$(ynh_app_setting_get $app language) db_name=$(ynh_app_setting_get $app db_name) +db_pwd=$(ynh_app_setting_get $app db_pwd) port=$(ynh_app_setting_get $app port) #=================================================