le-conf: Add triggers to reconfigure lightdm.conf when needed

Signed-off-by: 's avatarDiego Giovane Pasqualin <dpasqualin@c3sl.ufpr.br>
parent 5374b319
Package: le-conf Package: le-conf
Priority: important Priority: important
Section: main Section: main
Version: 0.0.30 Version: 0.0.31
Maintainer: LE Maintainer <le-maintainer@c3sl.ufpr.br> Maintainer: LE Maintainer <le-maintainer@c3sl.ufpr.br>
Description: Configuration scripts for Linux Educacional 5 Description: Configuration scripts for Linux Educacional 5
Architecture: all Architecture: all
......
...@@ -20,17 +20,18 @@ ...@@ -20,17 +20,18 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA. # USA.
service apparmor restart
###--LIGHTDM-AUTO-EXECUTE-SCRIPTS-CONFIG--### ###--LIGHTDM-AUTO-EXECUTE-SCRIPTS-CONFIG--###
if grep -q "greeter-setup-script=" /etc/lightdm/lightdm.conf; then if grep -q "greeter-setup-script" /etc/lightdm/lightdm.conf; then
##Change it # Change it
sed -i /"greeter-setup-script="/c"greeter-setup-script=/etc/lightdm/exec" /etc/lightdm/lightdm.conf sed -i /"greeter-setup-script.*"/c"greeter-setup-script=/etc/lightdm/exec" /etc/lightdm/lightdm.conf
else else
##Create it # Create it
echo "greeter-setup-script=/etc/lightdm/exec" >> /etc/lightdm/lightdm.conf sed -i '/\[SeatDefaults\]/ a\greeter-setup-script=/etc/lightdm/exec' \
/etc/lightdm/lightdm.conf
fi fi
###=======================================### ###=======================================###
service apparmor restart
exit 0 exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment