Zentyal Forum, Linux Small Business Server

Zentyal Server => Installation and Upgrades => Topic started by: maxprox on September 18, 2011, 03:19:22 pm

Title: Logon script zentyal-logon.bat
Post by: maxprox on September 18, 2011, 03:19:22 pm
Hello,

I can't find a suitabel answer.
Last week I worked half a day on an individual logon script. I do it in the file:
/home/samba/netlogon/zentyal-logon.bat
Today I see that all the work is gone!  (I work with a new zentyal 2.2)
Now I realize that any change in the web frontend results in both, the line in the smb.conf 'logon script = zentyal-logon.bat" as well as the script "zentyal-logon.bat" even written back  :-((

How / where or by what name do I have to create my own custom logon scripts?
For my own individual logon scripts? Which after the next updates still remain.
That is my question

Regards,
maxprox


Title: Re: Logon script zentyal-logon.bat
Post by: stuartiannaylor on September 18, 2011, 03:58:50 pm
zentyal runs on templates and you need to edit the template files rather than the end files.

from memory its usr/share/ebox/stubs


Title: Re: Logon script zentyal-logon.bat
Post by: maxprox on September 18, 2011, 10:22:59 pm
Hello,

thank you for the answer.
Okay -  with your help I found it under:
Code: [Select]
/usr/share/zentyal/stubs/samba/logon.bat.masBUT I hope that "zentyal" not seriously mean to want to edit this file???
I work for example with the SME-server and a school solution (paedML - only in Germany) and both use similar templates ...
BUT both are predefined include lines, which remain well preserved forever.
And also the include files already exist, but are never changed by the distribution.
And vice versa, it never makes sense to modify a template, which is still broken after the next update  :-\
So, what is the official -zentyal- way

regards,
maxprox
Title: Re: Logon script zentyal-logon.bat
Post by: christian on September 18, 2011, 11:02:12 pm
So, what is the official -zentyal- way

http://doc.zentyal.org/en/develop.html#service-advanced-customisation (http://doc.zentyal.org/en/develop.html#service-advanced-customisation)
Title: Re: Logon script zentyal-logon.bat
Post by: maxprox on September 18, 2011, 11:48:48 pm
Hello,

I have to read it twice to understand everything.
But if I really need to change the templates ...
Quote
Therefore, if you want to make your changes persistent, and prevent them from
being overwritten every time Zentyal saves changes, you must edit such templates
instead of system configuration files.

I personally think the solution is not so good.
The clear separation of system templates and individual user files seems a
cleaner solution (e.g. with include lines) -> IMHO
There is still a second option for me:
http://forum.zentyal.org/index.php/topic,6653.msg26811.html#msg26811 (http://forum.zentyal.org/index.php/topic,6653.msg26811.html#msg26811)
I'll try both

thank you,
maxprox
Title: Re: Logon script zentyal-logon.bat
Post by: J. A. Calvo on September 19, 2011, 04:10:26 pm
http://blogs.zentyal.org/jacalvo/2011/01/04/how-to-customize-the-configuration-files-generated-by-zentyal/
Title: Re: Logon script zentyal-logon.bat
Post by: maxprox on September 19, 2011, 11:58:42 pm
Hello J. A. Calvo,

thanks, I will read it.
This information  let me understand more and more the system of zentyal.
This approach is very new to me.

Quote
...
There is still a second option for me:
http://forum.zentyal.org/index.php/topic,6653.msg26811.html#msg26811 (http://forum.zentyal.org/index.php/topic,6653.msg26811.html#msg26811)
I'll try both ...

In my first test this second way seems to go (link above)

Quote
So if you want to add custom behaviour, you can put a 'logon.bat' file, or copy the zentyal-logon.bat to logon.bat and do the needed changes. As with other Zentyal modules you can also use hooks to override the default behaviour.

thank you,
maxprox
Title: Re: Logon script zentyal-logon.bat
Post by: guillo on June 14, 2015, 05:01:47 am
I found an answer here, in spanish, that worked for me.
http://www.itwebpoint.com/blog/linux/zentyal/zentyal4-logon-script/