File: oci-tail-last-puppet-log

package info (click to toggle)
openstack-cluster-installer 43.0.18
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,484 kB
  • sloc: php: 19,127; sh: 18,142; ruby: 75; makefile: 31; xml: 8
file content (17 lines) | stat: -rwxr-xr-x 280 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

set -e

find_last_log_file () {
	local CNT
	CNT=10
	while [ "${CNT}" -gt 0 ] && [ -z "${LOG_FILE}" ] ; do
		if [ -e /var/log/puppet-run-${CNT} ] ; then
			LOG_FILE=/var/log/puppet-run-${CNT}
		fi
		CNT=$((${CNT} - 1))
	done
}

find_last_log_file
tail -n 80 ${LOG_FILE}