mirror of
https://github.com/YunoHost-Apps/bozon_ynh.git
synced 2024-09-03 18:16:09 +02:00
Fix #8
This commit is contained in:
parent
1249058ae6
commit
6dd08e539c
2 changed files with 12 additions and 22 deletions
|
@ -63,15 +63,6 @@
|
||||||
},
|
},
|
||||||
"default": "2G"
|
"default": "2G"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "version",
|
|
||||||
"ask": {
|
|
||||||
"en": "Select the version of BoZoN you want to install",
|
|
||||||
"fr": "Sélectionnez la version de BoZoN que vous souhaitez installer"
|
|
||||||
},
|
|
||||||
"choices": ["Stable","Latest"],
|
|
||||||
"default": "Stable"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
"type": "user",
|
"type": "user",
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
# causes the shell to exit if any subcommand or pipeline returns a non-zero status
|
# causes the shell to exit if any subcommand or pipeline returns a non-zero status
|
||||||
set -e
|
set -e
|
||||||
|
# causes the shell to exit if you try to use an uninitialised variable
|
||||||
|
set -u
|
||||||
|
|
||||||
# retrieve arguments
|
# retrieve arguments
|
||||||
domain=$1
|
domain=$1
|
||||||
|
@ -9,9 +11,8 @@ path=$2
|
||||||
is_public=$3
|
is_public=$3
|
||||||
default_lang=$4
|
default_lang=$4
|
||||||
filesize=$5
|
filesize=$5
|
||||||
version=$6
|
admin=$6
|
||||||
admin=$7
|
password=$7
|
||||||
password=$8
|
|
||||||
|
|
||||||
# definie useful vars
|
# definie useful vars
|
||||||
app=bozon
|
app=bozon
|
||||||
|
@ -35,22 +36,20 @@ if [[ ! $? -eq 0 ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# retrieve stable version of bozon
|
||||||
|
stable=$(cat ../BoZoN-stable)
|
||||||
|
|
||||||
# save app settings
|
# save app settings
|
||||||
sudo yunohost app setting $app admin_user -v "$admin"
|
sudo yunohost app setting $app admin_user -v "$admin"
|
||||||
sudo yunohost app setting $app is_public -v "$is_public"
|
sudo yunohost app setting $app is_public -v "$is_public"
|
||||||
sudo yunohost app setting $app domain -v "$domain"
|
sudo yunohost app setting $app domain -v "$domain"
|
||||||
sudo yunohost app setting $app path -v "$path"
|
sudo yunohost app setting $app path -v "$path"
|
||||||
|
sudo yunohost app setting $app version -v "$stable"
|
||||||
|
|
||||||
# download bozon
|
# download stable version of bozon
|
||||||
if [ "$version" = "Latest" ];
|
sudo wget https://github.com/broncowdd/BoZoN/archive/$stable.zip -O $parent_path/bozon-$stable.zip
|
||||||
then
|
sudo unzip $parent_path/bozon-$stable.zip -d $parent_path/
|
||||||
sudo wget https://github.com/broncowdd/BoZoN/archive/master.zip -O $parent_path/master.zip
|
sudo rm $parent_path/bozon-$stable.zip
|
||||||
else
|
|
||||||
stable=$(curl https://raw.githubusercontent.com/ewilly/bozon_ynh/master/BoZoN-stable)
|
|
||||||
sudo wget https://github.com/broncowdd/BoZoN/archive/$stable.zip -O $parent_path/master.zip
|
|
||||||
fi
|
|
||||||
sudo unzip $parent_path/master.zip -d $parent_path/
|
|
||||||
sudo rm $parent_path/master.zip
|
|
||||||
sudo mv $parent_path/BoZoN-* $parent_path/$app
|
sudo mv $parent_path/BoZoN-* $parent_path/$app
|
||||||
|
|
||||||
# add required packages
|
# add required packages
|
||||||
|
|
Loading…
Add table
Reference in a new issue