Turris Omnia

Auto start LXC containers

Append /etc/config/lxc-auto with the following:

config container
    option name <container>
    option timeout <###>

config container
    option name <other-container>
    option timeout <###>

option timeout <###> is the time containers get for graceful shutdowns before being killed (defaults to: 300 seconds).

Crontab

# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
1  3  *  *  * fstrim -v /srv >> /srv/log/trim.log 2>&1
30  3  1  *  * lxc-backup -a >> /srv/log/lxc-backup.log 2>&1
30  3 15  *  * lxc-backup -s -a >> /srv/log/lxc-snapshot.log 2>&1