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:
parent
4af8b83189
commit
d239cbee3f
3 changed files with 27 additions and 0 deletions
2
TODO
2
TODO
|
@ -1,3 +1,5 @@
|
|||
- SSO / no SSO distinction
|
||||
- ?q=admin support
|
||||
- URL rewriting
|
||||
- Improve security (chown root / www-data)
|
||||
- Static cache
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue