mirror of
https://github.com/YunoHost-Apps/zeronet_ynh.git
synced 2024-09-03 17:46:12 +02:00
Replaces deprecated 'yunohost app checkurl'
This commit is contained in:
parent
7f925cb1f9
commit
af5e72e39a
2 changed files with 18 additions and 3 deletions
|
@ -117,7 +117,8 @@ main() {
|
||||||
local deploy_path=$( make_deploy_path $app $source_version )
|
local deploy_path=$( make_deploy_path $app $source_version )
|
||||||
local symlink_to_deploy_path="/var/www/${app}"
|
local symlink_to_deploy_path="/var/www/${app}"
|
||||||
|
|
||||||
sudo yunohost app checkurl $url -a $app
|
ynh_webpath_available $domain $path
|
||||||
|
ynh_webpath_register $app $domain $path
|
||||||
|
|
||||||
ynh_user_exists $user
|
ynh_user_exists $user
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,24 @@ install_dependencies() {
|
||||||
sudo apt-get install --quiet --yes python-msgpack python-gevent
|
sudo apt-get install --quiet --yes python-msgpack python-gevent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
is_app_restorable() {
|
||||||
|
local -r domain=$1
|
||||||
|
local -r path=$2
|
||||||
|
local -r deploy_path=$3
|
||||||
|
|
||||||
|
ynh_webpath_available $domain $path \
|
||||||
|
|| ynh_die "Path not available: ${domain}${path}"
|
||||||
|
|
||||||
|
test ! -d $deploy_path \
|
||||||
|
|| ynh_die "There is already a directory: $deploy_path"
|
||||||
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
local app=$YNH_APP_INSTANCE_NAME
|
local app=$YNH_APP_INSTANCE_NAME
|
||||||
|
local domain=$(ynh_app_setting_get $app domain)
|
||||||
|
local path=$(ynh_app_setting_get $app path)
|
||||||
local deploy_path=$(ynh_app_setting_get $app deploy_path)
|
local deploy_path=$(ynh_app_setting_get $app deploy_path)
|
||||||
local symlink_to_deploy_path=$(ynh_app_setting_get $app symlink_to_deploy_path)
|
local symlink_to_deploy_path=$(ynh_app_setting_get $app symlink_to_deploy_path)
|
||||||
local nginx_config_file=$( ynh_app_setting_get $app nginx_config_file )
|
local nginx_config_file=$( ynh_app_setting_get $app nginx_config_file )
|
||||||
|
@ -24,9 +38,9 @@ main() {
|
||||||
|
|
||||||
local url=$(ynh_app_setting_get $app url)
|
local url=$(ynh_app_setting_get $app url)
|
||||||
|
|
||||||
install_dependencies
|
is_app_restorable $domain $path $deploy_path
|
||||||
|
|
||||||
sudo yunohost app checkurl $url -a $app
|
install_dependencies
|
||||||
|
|
||||||
sudo cp -a "./sources" $deploy_path
|
sudo cp -a "./sources" $deploy_path
|
||||||
sudo ln --symbolic --force $deploy_path $symlink_to_deploy_path
|
sudo ln --symbolic --force $deploy_path $symlink_to_deploy_path
|
||||||
|
|
Loading…
Reference in a new issue