Skip to content

Commit f32a450

Browse files
Kalimuthu-Velappanjleveque
authored andcommitted
[generate_dump] Make regex more specific for disabling/enabling logrotate (#701)
1 parent d77c411 commit f32a450

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/generate_dump

+2-2
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ find_files() {
256256
# None
257257
###############################################################################
258258
disable_logrotate() {
259-
sed -i '/logrotate/s/^/#/g' /etc/cron.d/logrotate
259+
sed -i '/\/usr\/sbin\/logrotate/s/^/#/g' /etc/cron.d/logrotate
260260
}
261261

262262
###############################################################################
@@ -269,7 +269,7 @@ disable_logrotate() {
269269
# None
270270
###############################################################################
271271
enable_logrotate() {
272-
sed -i '/logrotate/s/^#*//g' /etc/cron.d/logrotate
272+
sed -i '/\/usr\/sbin\/logrotate/s/^#*//g' /etc/cron.d/logrotate
273273
}
274274

275275
###############################################################################

0 commit comments

Comments
 (0)