updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / acpi-eeepc-generic / acpi-eeepc-generic-logsbackup.rcd
blobbd81fa6c8e6194bea63ac7621febbdde96f2217f
1 #!/bin/bash
2 # Copyright 2009 Nicolas Bigaouette
3 # This file is part of acpi-eeepc-generic.
4 # http://code.google.com/p/acpi-eeepc-generic/
6 # acpi-eeepc-generic is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # acpi-eeepc-generic is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with acpi-eeepc-generic. If not, see <http://www.gnu.org/licenses/>.
19 now=`date +"%Y%m%d_%Hh%m"`
21 # Load configuration
22 . /etc/conf.d/acpi-eeepc-generic.conf
24 case "$1" in
25 stop)
26 [ ! -d "${LOGSBACKUP_FOLDER}" ] && mkdir -p "${LOGSBACKUP_FOLDER}"
27 tar -zcf "${LOGSBACKUP_FOLDER}/$now.tar.gz" /var/log/*
29 start)
32 echo 'Usage: /etc/rc.d/logsbackup {start||stop}'
33 exit 1
35 esac