1
0
Fork 0
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:
frju365 2017-01-30 20:17:13 +01:00 committed by GitHub
parent b385b0f9f0
commit e625e19b41

View file

@ -1,7 +1,7 @@
#!/bin/bash
# Retrieve app id
app=$YNH_APP_INSTANCE_NAME
app=abantecart
source /usr/share/yunohost/helpers
source ./_common
@ -13,8 +13,6 @@ is_public=$3
user=$4
passwd=$5
email=$6
with_mysql="true"
app=$YNH_APP_INSTANCE_NAME
# Check domain/path availability
sudo yunohost app checkurl $domain$path -a $app
@ -33,15 +31,15 @@ ynh_app_setting_set "$app" password "$passwd"
ynh_app_setting_set "$app" user "$user"
# Initialize database as needed
if [[ $with_mysql -eq 1 ]]; then
dbname=$app
dbuser=$app
dbpass=$(ynh_string_random)
ynh_mysql_create_db "$dbname" "$dbuser" "$dbpass"
# Store the database access
echo -e "# MySQL Database"
fi
dbname=$app
dbuser=$app
dbpass=$(ynh_string_random)
ynh_mysql_create_db "$dbname" "$dbuser" "$dbpass"
# Store the database access
echo -e "# MySQL Database"
# Remove trailing "/" for next commands
if [[ ! "$path" == "/" ]]; then
@ -67,7 +65,7 @@ sudo php cli_install.php install \
--username $user \
--password $passwd \
--email $email \
--http_server $path \
--http_server $domain$path \
# Files owned by root, www-data can just read