mirror of
https://github.com/YunoHost-Apps/ztncui_ynh.git
synced 2024-09-03 18:06:05 +02:00
[enh] specify experimental helpers
This commit is contained in:
parent
3dbb2dfc0d
commit
380ce69aef
8 changed files with 17 additions and 17 deletions
|
@ -14,7 +14,7 @@
|
|||
port="666" (PORT)
|
||||
; pre-install
|
||||
sudo yunohost app fetchlist
|
||||
sudo yunohost app install zerotier
|
||||
sudo yunohost app install https://github.com/tituspijean/zerotier_ynh
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_sub_dir=0
|
||||
|
|
|
@ -109,7 +109,7 @@ export N_PREFIX="$n_install_dir"
|
|||
# usage: ynh_install_n
|
||||
#
|
||||
# Requires YunoHost version 2.7.12 or higher.
|
||||
ynh_install_n () {
|
||||
EXPERIMENTAL_ynh_install_n () {
|
||||
ynh_print_info --message="Installation of N - Node.js version management"
|
||||
# Build an app.src for n
|
||||
mkdir -p "../conf"
|
||||
|
@ -160,7 +160,7 @@ SOURCE_SUM=3983fa3f00d4bf85ba8e21f1a590f6e28938093abe0bb950aeea52b1717471fc" > "
|
|||
# usage: ynh_use_nodejs
|
||||
#
|
||||
# Requires YunoHost version 2.7.12 or higher.
|
||||
ynh_use_nodejs () {
|
||||
EXPERIMENTAL_ynh_use_nodejs () {
|
||||
nodejs_version=$(ynh_app_setting_get --app=$app --key=nodejs_version)
|
||||
|
||||
# Get the absolute path of this version of node
|
||||
|
@ -196,7 +196,7 @@ ynh_use_nodejs () {
|
|||
# Refer to ynh_use_nodejs for more information about available commands and variables
|
||||
#
|
||||
# Requires YunoHost version 2.7.12 or higher.
|
||||
ynh_install_nodejs () {
|
||||
EXPERIMENTAL_ynh_install_nodejs () {
|
||||
# Use n, https://github.com/tj/n to manage the nodejs versions
|
||||
|
||||
# Declare an array to define the options of this helper.
|
||||
|
@ -274,7 +274,7 @@ ynh_install_nodejs () {
|
|||
# usage: ynh_remove_nodejs
|
||||
#
|
||||
# Requires YunoHost version 2.7.12 or higher.
|
||||
ynh_remove_nodejs () {
|
||||
EXPERIMENTAL_ynh_remove_nodejs () {
|
||||
nodejs_version=$(ynh_app_setting_get --app=$app --key=nodejs_version)
|
||||
|
||||
# Remove the line for this app
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source /usr/share/yunohost/helpers
|
||||
#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source /usr/share/yunohost/helpers
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# RETRIEVE ARGUMENTS
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source /usr/share/yunohost/helpers
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
|
@ -112,8 +112,8 @@ ynh_script_progression --message="Installing dependencies..." --time --weight=1
|
|||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
ynh_use_nodejs
|
||||
EXPERIMENTAL_ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
EXPERIMENTAL_ynh_use_nodejs
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source /usr/share/yunohost/helpers
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
|
@ -48,7 +48,7 @@ ynh_script_progression --message="Removing dependencies..." --time --weight=1
|
|||
|
||||
# Remove metapackage and its dependencies
|
||||
ynh_remove_app_dependencies
|
||||
ynh_remove_nodejs
|
||||
EXPERIMENTAL_ynh_remove_nodejs
|
||||
|
||||
#=================================================
|
||||
# REMOVE APP MAIN DIR
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source /usr/share/yunohost/helpers
|
||||
#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
|
@ -80,7 +80,7 @@ chown -R $app: $final_path
|
|||
#=================================================
|
||||
ynh_script_progression --message="Reinstalling dependencies..." --time --weight=1
|
||||
|
||||
ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
EXPERIMENTAL_ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
|
||||
#=================================================
|
||||
# RESTORE SYSTEMD
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source /usr/share/yunohost/helpers
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
|
@ -126,8 +126,8 @@ ynh_script_progression --message="Upgrading dependencies..." --time --weight=1
|
|||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
ynh_use_nodejs
|
||||
EXPERIMENTAL_ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
EXPERIMENTAL_ynh_use_nodejs
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
|
|
Loading…
Add table
Reference in a new issue