1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/movim_ynh.git synced 2024-09-03 19:46:19 +02:00

- Auto configure pod : language

- Auto configure pod : loglevel
- Auto configure pod : environment
- Auto configure pod : timezone
- Auto configure pod : admin and password
This commit is contained in:
src386 2015-08-10 15:52:45 +02:00
parent 4af8b83189
commit d239cbee3f
3 changed files with 27 additions and 0 deletions

2
TODO
View file

@ -1,3 +1,5 @@
- SSO / no SSO distinction
- ?q=admin support
- URL rewriting
- Improve security (chown root / www-data)
- Static cache

View file

@ -43,6 +43,23 @@
},
"choices": ["Yes", "No"],
"default": "No"
},
{
"name": "language",
"ask": {
"en": "Pod language",
"fr": "Langue du pod"
},
"choices" : ["en", "fr"],
"default" : "en"
},
{
"name": "password",
"ask": {
"en": "Administrator password",
"fr": "Mot de passe pour l'administrateur"
},
"example" : "password"
}
]
}

View file

@ -5,6 +5,8 @@ domain=$1
path=$2
admin=$3
public_site=$4
language=$5
password=$6
# Check domain/path availability
sudo yunohost app checkurl $domain$path -a movim
@ -44,6 +46,12 @@ sudo sed -i "s/yhuser/$db_user/g" $final_path/config/db.inc.php
sudo sed -i "s/yhpwd/$db_pwd/g" $final_path/config/db.inc.php
sudo sed -i "s/yhdb/$db_user/g" $final_path/config/db.inc.php
sudo sed -i "s@PATHTOCHANGE@$path@g" $final_path/app/assets/js/movim_websocket.js
sudo su -c "cd $final_path && php mud.php config locale:$language"
sudo su -c "cd $final_path && php mud.php config loglevel:1"
sudo su -c "cd $final_path && php mud.php config environment:production"
sudo su -c "cd $final_path && php mud.php config timezone:`cat /etc/timezone`"
sudo su -c "cd $final_path && php mud.php config username:$admin"
sudo su -c "cd $final_path && php mud.php config password:$password"
# Populate Movim database
sudo su -c "cd $final_path && php mud.php db set" -s /bin/sh www-data