mirror of
https://github.com/YunoHost-Apps/abantecart_ynh.git
synced 2024-09-03 18:06:16 +02:00
Update install
This commit is contained in:
parent
87abbddcda
commit
44dd8e94a2
1 changed files with 19 additions and 9 deletions
|
@ -1,24 +1,34 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
source /usr/share/yunohost/helpers
|
||||||
|
source ./_common
|
||||||
|
set -eu
|
||||||
|
|
||||||
# Retrieve app id
|
# Retrieve app id
|
||||||
app=abantecart
|
app=abantecart
|
||||||
|
|
||||||
source /usr/share/yunohost/helpers
|
|
||||||
source ./_common
|
|
||||||
|
|
||||||
# Retrieve arguments
|
# Retrieve arguments
|
||||||
domain=$1
|
domain=$1
|
||||||
path=${2%/}
|
path=$2
|
||||||
is_public=$3
|
is_public=$3
|
||||||
user=$4
|
user=$4
|
||||||
passwd=$5
|
passwd=$5
|
||||||
email=$6
|
email=$6
|
||||||
|
|
||||||
# Check domain/path availability
|
script_dir=$PWD
|
||||||
sudo yunohost app checkurl $domain$path -a $app
|
|
||||||
if [[ ! $? -eq 0 ]]; then
|
# Vérifie que les variables ne sont pas vides.
|
||||||
exit 1
|
CHECK_VAR "$app" "app name not set"
|
||||||
fi
|
CHECK_VAR "$script_dir" "script_dir not set"
|
||||||
|
|
||||||
|
CHECK_PATH # Vérifie et corrige la syntaxe du path.
|
||||||
|
CHECK_DOMAINPATH # Vérifie la disponibilité du path et du domaine.
|
||||||
|
|
||||||
|
CHECK_FINALPATH # Vérifie que le dossier de destination n'est pas déjà utilisé.
|
||||||
|
|
||||||
|
# Install dependency to convert tracks to a readable format for the browser
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get -y -qq install php5-mysql
|
||||||
|
|
||||||
# Check password strength
|
# Check password strength
|
||||||
[[ ${#passwd} -gt 5 ]] || ynh_die \
|
[[ ${#passwd} -gt 5 ]] || ynh_die \
|
||||||
|
|
Loading…
Add table
Reference in a new issue