Clean Jessie's late_command script config files
This commit is contained in:
parent
2d9e48c0ba
commit
96d1db0a87
Binary file not shown.
|
@ -1,18 +1,14 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
RSYSLOGD_CONF="$(dirname $0)/rsyslog.jessie/rsyslog.conf"
|
RSYSLOGD_CONF_SRC="$(dirname $0)/jessie/etc/rsyslog.conf"
|
||||||
RSYSLOGD_FILE="/etc/rsyslog.conf"
|
RSYSLOGD_CONF_PATH="/etc/rsyslog.conf"
|
||||||
RSYSLOGD_SYSLOG_CONF="$(dirname $0)/rsyslog.jessie/99syslog.conf"
|
RSYSLOGD_INCLUDE_SRC="$(dirname $0)/jessie/etc/rsyslog.d/"
|
||||||
RSYSLOGD_SYSLOG_FILE="/etc/rsyslog.d/99syslog.conf"
|
RSYSLOGD_INCLUDE_PATH="/etc/rsyslog.d/"
|
||||||
|
|
||||||
LOGROTATE_CONF="$(dirname $0)/logrotate.jessie/logrotate.conf"
|
LOGROTATE_CONF_SRC="$(dirname $0)/jessie/etc/logrotate.conf"
|
||||||
LOGROTATE_FILE="/etc/logrotate.conf"
|
LOGROTATE_CONF_PATH="/etc/logrotate.conf"
|
||||||
LOGROTATE_SYSLOG_CONF="$(dirname $0)/logrotate.jessie/rsyslog"
|
LOGROTATE_INCLUDE_SRC="$(dirname $0)/jessie/etc/logrotate.d/"
|
||||||
LOGROTATE_SYSLOG_FILE="/etc/logrotate.d/rsyslog"
|
LOGROTATE_INCLUDE_PATH="/etc/logrotate.d/"
|
||||||
LOGROTATE_APTITUDE_CONF="$(dirname $0)/logrotate.jessie/aptitude"
|
|
||||||
LOGROTATE_APTITUDE_FILE="/etc/logrotate.d/aptitude"
|
|
||||||
LOGROTATE_DPKG_CONF="$(dirname $0)/logrotate.jessie/dpkg"
|
|
||||||
LOGROTATE_DPKG_FILE="/etc/logrotate.d/dpkg"
|
|
||||||
|
|
||||||
## Packages {{{
|
## Packages {{{
|
||||||
# Ensure to have some basic packages
|
# Ensure to have some basic packages
|
||||||
|
@ -46,10 +42,11 @@ aptitude -y install openssh-server openssh-sftp-server
|
||||||
### Rsyslog {{{
|
### Rsyslog {{{
|
||||||
|
|
||||||
# Install new Rsyslog configuration
|
# Install new Rsyslog configuration
|
||||||
if [ -f "${RSYSLOGD_FILE}" ]; then
|
if [ -f "${RSYSLOGD_CONF_PATH}" ]; then
|
||||||
cp "${RSYSLOGD_CONF}" "${RSYSLOGD_FILE}"
|
cp -- "${RSYSLOGD_CONF_PATH}" "${RSYSLOGD_CONF_PATH}".orig
|
||||||
|
cp -- "${RSYSLOGD_CONF_SRC}" "${RSYSLOGD_CONF_PATH}"
|
||||||
fi
|
fi
|
||||||
cp "${RSYSLOGD_SYSLOG_CONF}" "${RSYSLOGD_SYSLOG_FILE}"
|
cp -- "${RSYSLOGD_INCLUDE_SRC}"* "${RSYSLOGD_INCLUDE_PATH}"
|
||||||
|
|
||||||
# Remove old log files
|
# Remove old log files
|
||||||
## Kernel log files
|
## Kernel log files
|
||||||
|
@ -69,12 +66,11 @@ rm -f /var/log/daemon.log /var/log/syslog /var/log/messages
|
||||||
### Logrotate {{{
|
### Logrotate {{{
|
||||||
|
|
||||||
# Install new Logrotate configuration
|
# Install new Logrotate configuration
|
||||||
if [ -f "${LOGROTATE_FILE}" ]; then
|
if [ -f "${LOGROTATE_CONF_PATH}" ]; then
|
||||||
cp "${LOGROTATE_CONF}" "${LOGROTATE_FILE}"
|
cp -- "${LOGROTATE_CONF_PATH}" "${LOGROTATE_CONF_PATH}".orig
|
||||||
|
cp -- "${LOGROTATE_CONF_SRC}" "${LOGROTATE_CONF_PATH}"
|
||||||
fi
|
fi
|
||||||
cp "${LOGROTATE_SYSLOG_CONF}" "${LOGROTATE_SYSLOG_FILE}"
|
cp -- "${LOGROTATE_INCLUDE_SRC}"* "${LOGROTATE_INCLUDE_PATH}"
|
||||||
cp "${LOGROTATE_APTITUDE_CONF}" "${LOGROTATE_APTITUDE_FILE}"
|
|
||||||
cp "${LOGROTATE_DPKG_CONF}" "${LOGROTATE_DPKG_FILE}"
|
|
||||||
|
|
||||||
# Create an archive directory for some log files (aptitude, dpkg,…)
|
# Create an archive directory for some log files (aptitude, dpkg,…)
|
||||||
mkdir -p -- /var/log/old_logs
|
mkdir -p -- /var/log/old_logs
|
||||||
|
|
Loading…
Reference in New Issue