Koozali.org formerly Contribs.org

adding to cron.daily

adding to cron.daily
« on: March 13, 2020, 06:56:16 PM »
Hi
I'm using openvpn and have to copy over the certifcates every 30 days to the openvpn routed directory using the script below
updatecert.sh

Code: [Select]
#! /bin/sh
# updatecert.sh
# update openvpn routed certificates
#
/cp -af /etc/openvpn/bridge/{priv,pub} /etc/openvpn/routed/
exit 0

Can I the above bash script to cron.daily or do I need to modify the templates?
Thanks
Rob Carter

Offline TerryF

  • grumpy old man
  • *
  • 1,324
Re: adding to cron.daily
« Reply #1 on: March 13, 2020, 10:40:03 PM »
I think templating is always the preferred method https://wiki.contribs.org/Cron_entry
--
qui scribit bis legit

Offline ReetP

  • *
  • 2,793
Re: adding to cron.daily
« Reply #2 on: March 14, 2020, 10:18:01 AM »
I think you can just drop that in there.

You only need to template if it is a specific file you are hacking eg adding to /etc/crontab

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Re: adding to cron.daily
« Reply #3 on: March 14, 2020, 06:08:47 PM »
Thanks for the replies and help

Offline Jean-Philippe Pialasse

  • *
  • 1,585
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: adding to cron.daily
« Reply #4 on: March 15, 2020, 01:41:28 AM »
if you put in cron.daily you will have to remember it is there when backup restoring to sme10.

if it is templated in template-custom of crontab you can forget about it

otherwise both are valid.