You've already forked journal-log-ubuntu
comment corrections only no code changes
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# Author : Allan Christensen
|
||||
# First Created : 23112021 (DD-MM-YYYY)
|
||||
@@ -12,13 +11,19 @@
|
||||
if [[ $(id -u) -ne 0 ]]; then printf "\nMust be root or use sudo!\n\n"; exit; fi
|
||||
|
||||
#
|
||||
# Create cronjob
|
||||
# Create cron job
|
||||
#
|
||||
cronjob01="0 2 * * 7 root /usr/local/sbin/clear-journal-log >/dev/null 2>&1"
|
||||
echo "$cronjob01" > /etc/cron.d/clear-journal-log
|
||||
|
||||
#
|
||||
# Create clear journal log script to be executed by cron
|
||||
# Ensure correct permissions for /etc/cron.d entries
|
||||
#
|
||||
chmod 644 /etc/cron.d/clear-journal-log
|
||||
chown root:root /etc/cron.d/clear-journal-log
|
||||
|
||||
#
|
||||
# Create script to clear the journal log executed by cron
|
||||
#
|
||||
cat > /usr/local/sbin/clear-journal-log <<EOF
|
||||
#!/usr/bin/env bash
|
||||
|
||||
Reference in New Issue
Block a user