mirror of
https://github.com/YunoHost-Apps/freshrss_ynh.git
synced 2024-09-03 18:36:33 +02:00
recuperation de l'adresse mail principale
This commit is contained in:
parent
478e87eab1
commit
579fd5d278
2 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ sudo rm /tmp/$myuser-install.sql
|
||||||
#copy default conf
|
#copy default conf
|
||||||
sudo cp /var/www/freshrss/data/user.php.dist /var/www/freshrss/data/$myuser\_user.php
|
sudo cp /var/www/freshrss/data/user.php.dist /var/www/freshrss/data/$myuser\_user.php
|
||||||
#change email
|
#change email
|
||||||
user_email=$(ldapsearch -h localhost -b uid=$myuser,ou=users,dc=yunohost,dc=org -x objectClass=mailAccount mail | grep mail: | grep $myuser| sed 's/mail: //')
|
user_email=$(ldapsearch -h localhost -b uid=$myuser,ou=users,dc=yunohost,dc=org -x objectClass=mailAccount mail | grep mail: | head -n 1| sed 's/mail: //')
|
||||||
sudo sed -i "s/ynoUserEmail/$user_email/g" /var/www/freshrss//data/$myuser\_user.php
|
sudo sed -i "s/ynoUserEmail/$user_email/g" /var/www/freshrss//data/$myuser\_user.php
|
||||||
#change username
|
#change username
|
||||||
sudo sed -i "s/YnoUser/$myuser/g" /var/www/freshrss/data/$myuser\_user.php
|
sudo sed -i "s/YnoUser/$myuser/g" /var/www/freshrss/data/$myuser\_user.php
|
||||||
|
|
|
@ -51,7 +51,7 @@ do
|
||||||
#copy default conf
|
#copy default conf
|
||||||
sudo cp ../conf/dist_user.conf $final_path/data/$myuser\_user.php
|
sudo cp ../conf/dist_user.conf $final_path/data/$myuser\_user.php
|
||||||
#change email
|
#change email
|
||||||
user_email=$(ldapsearch -h localhost -b uid=$myuser,ou=users,dc=yunohost,dc=org -x objectClass=mailAccount mail | grep mail: | grep $myuser| sed 's/mail: //')
|
user_email=$(ldapsearch -h localhost -b uid=$myuser,ou=users,dc=yunohost,dc=org -x objectClass=mailAccount mail | grep mail: | head -n 1| sed 's/mail: //')
|
||||||
sudo sed -i "s/ynoUserEmail/$user_email/g" $final_path/data/$myuser\_user.php
|
sudo sed -i "s/ynoUserEmail/$user_email/g" $final_path/data/$myuser\_user.php
|
||||||
#change username
|
#change username
|
||||||
sudo sed -i "s/YnoUser/$myuser/g" $final_path/data/$myuser\_user.php
|
sudo sed -i "s/YnoUser/$myuser/g" $final_path/data/$myuser\_user.php
|
||||||
|
|
Loading…
Reference in a new issue