1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/opentracker_ynh.git synced 2024-09-03 19:46:34 +02:00
This commit is contained in:
ericgaspar 2021-01-27 18:56:02 +01:00
parent fd74914530
commit 973a4062f3
No known key found for this signature in database
GPG key ID: 574F281483054D44
5 changed files with 14 additions and 22 deletions

View file

@ -21,15 +21,7 @@
"nginx"
],
"arguments": {
"install": [{
"name": "domain",
"type": "domain",
"ask": {
"en": "Choose a domain name for OpenTracker",
"fr": "Choisissez un nom de domaine pour OpenTracker"
},
"example": "example.com"
}
"install": [
]
}
}

View file

@ -24,7 +24,7 @@ ynh_abort_if_errors
#=================================================
# Retrieve arguments
domain=$YNH_APP_ARG_DOMAIN
#domain=$YNH_APP_ARG_DOMAIN
app=$YNH_APP_INSTANCE_NAME
#=================================================
@ -40,7 +40,7 @@ test ! -e "$final_path" || ynh_die "This path already contains a folder"
#=================================================
ynh_script_progression --message="Storing installation settings..." --weight=1
ynh_app_setting_set --app=$app --key=domain --value=$domain
#ynh_app_setting_set --app=$app --key=domain --value=$domain
#=================================================
# FIND AND OPEN A PORT
@ -69,9 +69,9 @@ ynh_script_progression --message="Installing OpenTracker..." --weight=5
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
git clone git://erdgeist.org/opentracker "$final_path" --quiet
pushd "$final_path" || ynh_die
pushd $final_path
ynh_exec_warn_less make
popd || ynh_die
popd
#=================================================
# CREATE DEDICATED USER

View file

@ -16,7 +16,7 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
#domain=$(ynh_app_setting_get --app=$app --key=domain)
port=$(ynh_app_setting_get --app=$app --key=port)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)

View file

@ -26,18 +26,18 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
#domain=$(ynh_app_setting_get --app=$app --key=domain)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
# CHECK IF THE APP CAN BE RESTORED
#=================================================
ynh_script_progression --message="Validating restoration parameters..." --weight=1
# ynh_script_progression --message="Validating restoration parameters..." --weight=1
ynh_webpath_available --domain=$domain \
|| ynh_die --message="Path not available: $domain"
test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path "
# ynh_webpath_available --domain=$domain \
# || ynh_die --message="Path not available: $domain"
# test ! -d $final_path \
# || ynh_die --message="There is already a directory: $final_path "
#=================================================
# RESTORE THE APP MAIN DIR
@ -92,7 +92,7 @@ yunohost service add $app --description="Bittorrent tracker" --log="/var/log/$ap
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
ynh_systemd_action --service_name=$app --action=start --log_path="/var/log/$app/$app.log"
#=================================================
# END OF SCRIPT

View file

@ -16,7 +16,7 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
#domain=$(ynh_app_setting_get --app=$app --key=domain)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================