diff --git a/README.md b/README.md index 2236f03..f57d0a9 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,10 @@ This package will install the same plugins than [Framapad](https://framapad.org/ ![](http://etherpad.org/img/screenshot.png) +## Demo + +* [Official demo](https://oasis.sandstorm.io/appdemo/h37dm17aa89yrd8zuqpdn36p6zntumtv08fjpu8a8zrte7q1cn60) + ## Configuration You can access to 2 different admin panels, for etherpad by accessing `domain.tld/admin` and for mypads by `domain.tld/mypads/?/admin`. @@ -37,7 +41,7 @@ Supported, with LDAP. #### Supported architectures * x86-64b - [![Build Status](https://ci-apps.yunohost.org/jenkins/job/etherpad_mypads%20(Community)/badge/icon)](https://ci-apps.yunohost.org/jenkins/job/etherpad_mypads%20(Community)/) -* ARMv8-A - [![Build Status](https://ci-apps.yunohost.org/jenkins/job/etherpad_mypads%20(Community)%20(%7EARM%7E)/badge/icon)](https://ci-apps.yunohost.org/jenkins/job/etherpad_mypads%20(Community)%20(%7EARM%7E)/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/jenkins/job/etherpad_mypads%20(Community)%20(%7EARM%7E)/badge/icon)](https://ci-apps-arm.yunohost.org/jenkins/job/etherpad_mypads%20(Community)%20(%7EARM%7E)/) ## Limitations diff --git a/README_fr.md b/README_fr.md index 748ba27..24ab0aa 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,6 +18,10 @@ Ce paquet installera les mêmes plugins que [Framapad](https://framapad.org/). ![](http://etherpad.org/img/screenshot.png) +## Démo + +* [Démo officielle](https://oasis.sandstorm.io/appdemo/h37dm17aa89yrd8zuqpdn36p6zntumtv08fjpu8a8zrte7q1cn60) + ## Configuration Vous pouvez accéder à 2 panneaux d'administration différents, pour etherpad en accédant à `domain.tld/admin` et pour mypads par `domain.tld/mypads/?/admin`. @@ -37,7 +41,7 @@ Supportée, avec LDAP. #### Architectures supportées. * x86-64b - [![Build Status](https://ci-apps.yunohost.org/jenkins/job/etherpad_mypads%20(Community)/badge/icon)](https://ci-apps.yunohost.org/jenkins/job/etherpad_mypads%20(Community)/) -* ARMv8-A - [![Build Status](https://ci-apps.yunohost.org/jenkins/job/etherpad_mypads%20(Community)%20(%7EARM%7E)/badge/icon)](https://ci-apps.yunohost.org/jenkins/job/etherpad_mypads%20(Community)%20(%7EARM%7E)/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/jenkins/job/etherpad_mypads%20(Community)%20(%7EARM%7E)/badge/icon)](https://ci-apps-arm.yunohost.org/jenkins/job/etherpad_mypads%20(Community)%20(%7EARM%7E)/) ## Limitations diff --git a/conf/systemd.service b/conf/systemd.service index 32b995f..0325d86 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -6,7 +6,6 @@ After=syslog.target network.target Type=simple User=__APP__ Group=__APP__ -ExecStartPre=__NODEJS__ Environment="PATH=__ENV_PATH__" ExecStart=__FINALPATH__/bin/safeRun.sh /var/log/__APP__/etherpad.log Restart=always diff --git a/scripts/._common.sh.kate-swp b/scripts/._common.sh.kate-swp new file mode 100644 index 0000000..f0cbe98 Binary files /dev/null and b/scripts/._common.sh.kate-swp differ diff --git a/scripts/_common.sh b/scripts/_common.sh index 360864f..147560b 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -27,7 +27,7 @@ CHECK_SIZE () { # Vérifie avant chaque backup que l'espace est suffisant #================================================= n_install_dir="/opt/node_n" -node_version_path="/opt/node_n/n/versions/node" +node_version_path="$n_install_dir/n/versions/node" # N_PREFIX is the directory of n, it needs to be loaded as a environment variable. export N_PREFIX="$n_install_dir" @@ -57,28 +57,21 @@ SOURCE_SUM=2ba3c9d4dd3c7e38885b37e02337906a1ee91febe6d5c9159d89a9050f2eea8f" > " # - $nodejs_path: The absolute path of node for the chosen version. # - $nodejs_version: Just the version number of node for this app. Stored as 'nodejs_version' in settings.yml. # And 2 alias stored in variables: -# - $nodejs_use_version: An alias to load a node version in the current shell. Especially useful for systemd. +# - $nodejs_use_version: An old variable, not used anymore. Keep here to not break old apps # NB: $PATH will contain the path to node, it has to be propagated to any other shell which needs to use it. -# - $ynh_node_exec: An alias to execute a command with node. +# That's means it have to be added to any systemd script. # # usage: ynh_use_nodejs ynh_use_nodejs () { nodejs_version=$(ynh_app_setting_get $app nodejs_version) - # Add "$n_install_dir/bin" to the PATH variable if it isn't already added. - # And define N_PREFIX in the current shell. - load_n_path="[[ :$PATH: == *\":$n_install_dir/bin:\"* ]] || PATH=\"$n_install_dir/bin:$PATH\"; N_PREFIX="$n_install_dir"" - - nodejs_use_version="$n_install_dir/bin/n -q $nodejs_version" - - # "Load" a version of node - eval $load_n_path; $nodejs_use_version + nodejs_use_version="echo \"Deprecated command, should be removed\"" # Get the absolute path of this version of node - nodejs_path="$(n bin $nodejs_version)" + nodejs_path="$node_version_path/$nodejs_version/bin" - # Make an alias for node use - ynh_node_exec="eval $load_n_path; n use $nodejs_version" + # Load the path of this version of node in $PATH + [[ :$PATH: == *":$nodejs_path"* ]] || PATH="$nodejs_path:$PATH" } # Install a specific version of nodejs @@ -109,7 +102,7 @@ ynh_install_nodejs () { test -x /usr/bin/npm && mv /usr/bin/npm /usr/bin/npm_n # If n is not previously setup, install it - if ! test $(n --version) > /dev/null 2>&1 + if ! test $(n --version > /dev/null 2>&1) then ynh_install_n fi diff --git a/scripts/install b/scripts/install index 39658fc..27a4853 100644 --- a/scripts/install +++ b/scripts/install @@ -198,7 +198,6 @@ chmod 600 $final_path/credentials.json # Restrict access to credentials.json # SETUP SYSTEMD #================================================= -ynh_replace_string "__NODEJS__" "$nodejs_use_version" "../conf/systemd.service" ynh_replace_string "__ENV_PATH__" "$PATH" "../conf/systemd.service" ynh_add_systemd_config