1
0
Fork 0
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:
plopoyop 2014-07-29 18:20:29 +02:00
parent 478e87eab1
commit 579fd5d278
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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