Changeset 0f7ad57
- Timestamp:
- 07/05/2019 07:25:15 AM (4 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 9.0, 9.1, ken/inkscape-core-mods, lazarus, plabs/python-mods, qt5new, trunk, upgradedb, xry111/intltool, xry111/soup3, xry111/test-20220226
- Children:
- 9a121c0
- Parents:
- da39a659
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
general/sysutils/logrotate.xml
rda39a659 r0f7ad57 78 78 </para> 79 79 80 <bridgehead renderas="sect4" >Recommended</bridgehead>81 <para role="recommended" >80 <bridgehead renderas="sect4" revision="sysv">Recommended</bridgehead> 81 <para role="recommended" revision="sysv"> 82 82 <xref role="runtime" linkend="fcron"/> (runtime) 83 83 </para> … … 223 223 because they are not actually created.</para> 224 224 225 <para>To set up <xref linkend='fcron'/> to run 226 <command>logrotate ...</command> at 3AM daily, root's crontab should be 227 edited to add:</para> 228 229 <screen><literal>0 3 * * * /usr/sbin/logrotate /etc/logrotate.conf</literal></screen> 230 225 <para> 226 To run the <command>logrotate</command> daily, 227 <phrase revision="sysv">if you've installed 228 <xref linkend="fcron"/> and completed the section on periodic jobs, 229 execute</phrase><phrase revision="systemd">execute</phrase> the following 230 commands, as the <systemitem class="username">root</systemitem> user, 231 to create a <phrase revision="sysv">daily cron job:</phrase> 232 <phrase revision="systemd">systemd timer to run daily at 3:00 A.M. 233 (local time):</phrase> 234 </para> 235 236 <screen role="root" revision="sysv"><userinput>cat > /etc/cron.daily/logrotate.sh << "EOF" && 237 <literal>#!/bin/bash 238 /usr/sbin/logrotate /etc/logrotate.conf</literal> 239 EOF 240 chmod 754 /etc/cron.daily/logrotate.sh</userinput></screen> 241 242 <screen role="root" revision="systemd"><userinput>cat > /lib/systemd/system/logrotate.service << "EOF" && 243 <literal>[Unit] 244 Description=Runs the logrotate command 245 Documentation=logrotate(8) 246 DefaultDependencies=no 247 After=local-fs.target 248 Before=shutdown.target 249 250 [Service] 251 Type=oneshot 252 RemainAfterExit=yes 253 ExecStart=/usr/sbin/logrotate /etc/logrotate.conf</literal> 254 EOF 255 cat > /lib/systemd/system/logroate.timer << "EOF" && 256 <literal>[Unit] 257 Description=Runs the logrotate command daily at 3:00 AM 258 259 [Timer] 260 OnCalendar=*-*-* 3:00:00 261 Persistent=true 262 263 [Install] 264 WantedBy=timers.target</literal> 265 EOF 266 systemctl enable logrotate.timer</userinput></screen> 231 267 232 268 </sect2> -
introduction/welcome/changelog.xml
rda39a659 r0f7ad57 49 49 <para>[dj] - Add Polkit as a runtime dependency for 50 50 Xorg-Server and remove --enable-install-setuid switch.</para> 51 </listitem> 52 <listitem> 53 <para revision="sysv">[dj] - Use cron.daily for logrotate cron 54 job.</para> 55 <para revision="systemd">[dj] - Add daily systemd timer for 56 logrotate.</para> 51 57 </listitem> 52 58 </itemizedlist>
Note:
See TracChangeset
for help on using the changeset viewer.