Koozali.org: home of the SME Server
Obsolete Releases => SME 6.x Contribs => Topic started by: steve288 on May 18, 2006, 08:03:33 PM
-
I'm trying to come up to speed on this template thing.
I want to see what the template would make.
eg in the documentation it says I can do this...
expand-template /etc/crontab
But what if I want to just see what a particular template looks like w/out activating it.
eg some thing like "expand-template /etc/crontab >out.txt" ????
if you know what I mean.
In particular I want to do it with procmail.
Thnaks.
-
cant you just create a bogus file (crontab.test) and set of custom-template folders "crontab.test"
expand-template /etc/crontab.test would produce the resulting file for your testing. When you satisfyed with the results, move the fragments of the the template from the crontab.test to the real template-custom folder "crontab".
The same for procmail file.
-
Hey thanks. Yes that seems to work. I trying it on crontab.
Here is how I did it for any novice at this and trying to understand it.
How to set up a test template file on crontab for example
Copy /etc/crontab to /etc/crontab.test
Copy /etc/e-smith/templates/etc/crontab directory to /etc/e-smith/templates/etc/crontab.test
Create a file named anything you like but that starts with 25. Eg 25templatetest
Put in the file (based on “Changing a configuration template” instructions in http://mirror.contribs.org/smeserver/contribs//gordonr/devguide/html/devguide.html#TEMPLATES) the following line
*/20 * * * * root /usr/bin/logger -t "Demo" "......"
or any properly formulated cron command.
Now type and execute the following command
/sbin/e-smith/expand-template /etc/crontab.test
Take a look at the file /etc/crontab.test this will have your changed data in it.
Thanks so far so good.
-
Just a note:
you should use custom templates used before the original templates for your add-ons and tests. If you broke something, simple remove the custom template in question and expand the template. Your config file will be back to original. Do not change the original templates unless your are changing the core package. Next "official" update of the core package may overwrite your changes in the templates, but will not touch the custom templates.