Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Benjamin Graillot
scripts
Commits
b04a9e64
Commit
b04a9e64
authored
Jun 11, 2013
by
Vincent Le gallic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Je veux pas t'entendre quand tu logrotate les logs du firewall.
Fix de
0b22dda0
, il manquait un truc.
parent
10b56a4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
firewall/firewall-logrotate-script.sh
firewall/firewall-logrotate-script.sh
+1
-2
No files found.
firewall/firewall-logrotate-script.sh
View file @
b04a9e64
...
...
@@ -11,7 +11,6 @@ if [[ `hostname` == 'komaz' ]]; then
else
exit
41
fi
logs_dst
=
"/home/squid/
`
hostname
`
/logs"
if
[
!
-d
"
$logs_dst
"
]
;
then
...
...
@@ -20,7 +19,7 @@ if [ ! -d "$logs_dst" ]; then
fi
# tant qu'il existe un fichier, le sauvegarder (<!>)
while
(
ls
-tr
"
$logs_src
"
|
grep
-E
'logall\.log\.[0-9]+\..z2?'
)
;
do
while
(
ls
-tr
"
$logs_src
"
|
grep
-E
-q
'logall\.log\.[0-9]+\..z2?'
)
;
do
dernier_fichier
=
$logs_src
/
$(
ls
-tr
"
$logs_src
"
|
grep
-E
'logall\.log\.[0-9]+\..z2?'
|
head
-1
)
#timestamp=$(bzcat "$dernier_fichier" | head -1 | awk '{print $1}')
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment