mirror of
https://github.com/YunoHost-Apps/bozon_ynh.git
synced 2024-09-03 18:16:09 +02:00
update
This commit is contained in:
parent
3b081ff55e
commit
43462e9782
2 changed files with 18 additions and 10 deletions
|
@ -50,6 +50,15 @@
|
|||
"choices": ["Yes", "No"],
|
||||
"default": "No"
|
||||
},
|
||||
{
|
||||
"name": "language",
|
||||
"ask": {
|
||||
"en": "Default language",
|
||||
"fr": "Langue par défaut"
|
||||
},
|
||||
"choices": ["de","en","es","fr"],
|
||||
"default": "en"
|
||||
},
|
||||
{
|
||||
"name": "filesize",
|
||||
"ask": {
|
||||
|
|
|
@ -11,9 +11,10 @@ app=bozon
|
|||
domain=$1
|
||||
path=${2%/}
|
||||
is_public=$3
|
||||
filesize=$4
|
||||
admin=$5
|
||||
password=$6
|
||||
language=$4
|
||||
filesize=$5
|
||||
admin=$6
|
||||
password=$7
|
||||
|
||||
# definie useful vars
|
||||
parent_path=/var/www
|
||||
|
@ -50,6 +51,9 @@ sudo chown -R root: "$final_path"
|
|||
sudo find "$final_path" -type f | xargs sudo chmod 644
|
||||
sudo find "$final_path" -type d | xargs sudo chmod 755
|
||||
|
||||
# configure config file
|
||||
sudo sed -i "s@languageuage='en';@languageuage='${language}';@g" "$final_path"/config.php
|
||||
|
||||
# create data folders
|
||||
sudo mkdir -p "$final_path"/private
|
||||
sudo mkdir -p "$data_path"/uploads
|
||||
|
@ -104,13 +108,8 @@ sudo service nginx restart || true
|
|||
|
||||
# fill the superadmin creation form
|
||||
curl_path=$([ "$path" == "/" ] || echo "$path")
|
||||
curl -k -X POST \
|
||||
--data-urlencode creation="1" \
|
||||
--data-urlencode login="$admin" \
|
||||
--data-urlencode pass="$password" \
|
||||
--data-urlencode confirm="$password" \
|
||||
https://"$domain""$curl_path"/index.php?p=login > /dev/null 2>&1
|
||||
curl -k -X POST \
|
||||
curl https://"$domain""$curl_path"/index.php?p=login > /dev/null 2>&1
|
||||
curl -X POST \
|
||||
--data-urlencode creation="1" \
|
||||
--data-urlencode login="$admin" \
|
||||
--data-urlencode pass="$password" \
|
||||
|
|
Loading…
Reference in a new issue