459 lines
29 KiB
HTML
459 lines
29 KiB
HTML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
|
<head>
|
|
<!-- 2021-01-01 ven. 20:09 -->
|
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
|
<title><code>systemd</code> services and timers</title>
|
|
<meta name="generator" content="Org mode" />
|
|
<meta name="author" content="Dehaeze Thomas" />
|
|
<link rel="stylesheet" type="text/css" href="./dist/style.css"/>
|
|
<script type="text/javascript" src="./dist/script.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="org-div-home-and-up">
|
|
<a accesskey="h" href="./index.html"> UP </a>
|
|
|
|
|
<a accesskey="H" href="./index.html"> HOME </a>
|
|
</div><div id="content">
|
|
<h1 class="title"><code>systemd</code> services and timers</h1>
|
|
<div id="table-of-contents">
|
|
<h2>Table of Contents</h2>
|
|
<div id="text-table-of-contents">
|
|
<ul>
|
|
<li><a href="#org9efc12d"><code>bukugit</code> - Automatic commit and push new bookmarks</a>
|
|
<ul>
|
|
<li><a href="#org66d0b8b">Service</a></li>
|
|
<li><a href="#org6446e63">Timer</a></li>
|
|
<li><a href="#orge7172ba">Script</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#orga6ac362"><code>braingit</code> - Automatic commit and push new brain pages</a>
|
|
<ul>
|
|
<li><a href="#orgaae4848">Service</a></li>
|
|
<li><a href="#org6a6fc4a">Timer</a></li>
|
|
<li><a href="#orgd894d23">Script</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#orgcd55ae1"><code>checkmail</code> - Check new mails</a>
|
|
<ul>
|
|
<li><a href="#orgc063793">Service</a></li>
|
|
<li><a href="#org81f3f11">Timer</a></li>
|
|
<li><a href="#orga2cf44a">Script</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#orgb4148ce"><code>syncmail</code> - Synchronize all mails</a>
|
|
<ul>
|
|
<li><a href="#orgab0dd46">Service</a></li>
|
|
<li><a href="#org7b96d65">Timer</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org64a5ff5"><code>vdirsyncer</code> - Synchronize calendar and contacts</a>
|
|
<ul>
|
|
<li><a href="#orgf2c8322">Service</a></li>
|
|
<li><a href="#org0f85a10">Timer</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#orgea6990c"><code>ssh-agent</code> - SSH Agent</a>
|
|
<ul>
|
|
<li><a href="#org4390641">Service</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org6c316cc"><code>powertop</code> - Powertop</a>
|
|
<ul>
|
|
<li><a href="#org782b2ab">Service</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<p>
|
|
<a href="https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units">https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units</a>
|
|
</p>
|
|
|
|
<div id="outline-container-org9efc12d" class="outline-2">
|
|
<h2 id="org9efc12d"><code>bukugit</code> - Automatic commit and push new bookmarks</h2>
|
|
<div class="outline-text-2" id="text-org9efc12d">
|
|
</div>
|
|
<div id="outline-container-org66d0b8b" class="outline-3">
|
|
<h3 id="org66d0b8b">Service</h3>
|
|
<div class="outline-text-3" id="text-org66d0b8b">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">[<span class="org-type">Unit</span>]
|
|
<span class="org-variable-name">Description</span>=Sync Bookmarks every day
|
|
<span class="org-variable-name">RefuseManualStart</span>=no
|
|
<span class="org-variable-name">RefuseManualStop</span>=yes
|
|
|
|
[<span class="org-type">Service</span>]
|
|
<span class="org-variable-name">Type</span>=oneshot
|
|
<span class="org-variable-name">ExecStart</span>=%h/.local/bin/buku_git_push
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org6446e63" class="outline-3">
|
|
<h3 id="org6446e63">Timer</h3>
|
|
<div class="outline-text-3" id="text-org6446e63">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">[<span class="org-type">Unit</span>]
|
|
<span class="org-variable-name">Description</span>=Sync All Mails every x hours
|
|
<span class="org-variable-name">RefuseManualStart</span>=no
|
|
<span class="org-variable-name">RefuseManualStop</span>=no
|
|
<span class="org-variable-name">Wants</span>=network-online.target
|
|
<span class="org-variable-name">After</span>=network-online.target
|
|
|
|
[<span class="org-type">Timer</span>]
|
|
<span class="org-variable-name">OnCalendar</span>=*-*-* <span class="org-highlight-numbers-number">16</span>:<span class="org-highlight-numbers-number">00</span>:<span class="org-highlight-numbers-number">00</span>
|
|
<span class="org-variable-name">Persistent</span>=true
|
|
<span class="org-variable-name">Unit</span>=bukugit.service
|
|
|
|
[<span class="org-type">Install</span>]
|
|
<span class="org-variable-name">WantedBy</span>=default.target
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orge7172ba" class="outline-3">
|
|
<h3 id="orge7172ba">Script</h3>
|
|
<div class="outline-text-3" id="text-orge7172ba">
|
|
<div class="org-src-container">
|
|
<pre class="src src-bash"><span class="org-type">cd</span> ~/.local/share/buku/
|
|
|
|
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span><span class="org-rainbow-delimiters-depth-2">[</span> <span class="org-negation-char">!</span> -z $<span class="org-rainbow-delimiters-depth-3">(</span><span class="org-sh-quoted-exec">git</span> status -s bookmarks.db<span class="org-rainbow-delimiters-depth-3">)</span> <span class="org-rainbow-delimiters-depth-2">]</span><span class="org-rainbow-delimiters-depth-1">]</span>
|
|
<span class="org-keyword">then</span>
|
|
<span class="org-type">rm</span> bookmarks.org;
|
|
buku -e bookmarks.org && <span class="org-sh-escaped-newline">\</span>
|
|
<span class="org-type">cat</span> header.org bookmarks.org > index.org && <span class="org-sh-escaped-newline">\</span>
|
|
emacs index.org --batch -f org-html-export-to-html --kill && <span class="org-sh-escaped-newline">\</span>
|
|
<span class="org-type">git</span> add index.html
|
|
|
|
<span class="org-type">git</span> add bookmarks.db && <span class="org-sh-escaped-newline">\</span>
|
|
<span class="org-type">git</span> commit -m <span class="org-string">"Changed bookmarks - </span><span class="org-string"><span class="org-sh-quoted-exec">$(</span></span><span class="org-sh-quoted-exec">date</span><span class="org-string"><span class="org-sh-quoted-exec"> +%F)</span></span><span class="org-string">"</span> && <span class="org-sh-escaped-newline">\</span>
|
|
<span class="org-type">git</span> push
|
|
<span class="org-keyword">exit</span>
|
|
<span class="org-keyword">fi</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orga6ac362" class="outline-2">
|
|
<h2 id="orga6ac362"><code>braingit</code> - Automatic commit and push new brain pages</h2>
|
|
<div class="outline-text-2" id="text-orga6ac362">
|
|
</div>
|
|
<div id="outline-container-orgaae4848" class="outline-3">
|
|
<h3 id="orgaae4848">Service</h3>
|
|
<div class="outline-text-3" id="text-orgaae4848">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">[<span class="org-type">Unit</span>]
|
|
<span class="org-variable-name">Description</span>=Sync Brain Website everyday
|
|
<span class="org-variable-name">RefuseManualStart</span>=no
|
|
<span class="org-variable-name">RefuseManualStop</span>=yes
|
|
|
|
[<span class="org-type">Service</span>]
|
|
<span class="org-variable-name">Type</span>=oneshot
|
|
<span class="org-variable-name">ExecStart</span>=%h/.local/bin/brain_git_push
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org6a6fc4a" class="outline-3">
|
|
<h3 id="org6a6fc4a">Timer</h3>
|
|
<div class="outline-text-3" id="text-org6a6fc4a">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">[<span class="org-type">Unit</span>]
|
|
<span class="org-variable-name">Description</span>=Sync Brain Website everyday
|
|
<span class="org-variable-name">RefuseManualStart</span>=no
|
|
<span class="org-variable-name">RefuseManualStop</span>=no
|
|
<span class="org-variable-name">Wants</span>=network-online.target
|
|
<span class="org-variable-name">After</span>=network-online.target
|
|
|
|
[<span class="org-type">Timer</span>]
|
|
<span class="org-variable-name">OnCalendar</span>=*-*-* <span class="org-highlight-numbers-number">16</span>:<span class="org-highlight-numbers-number">00</span>:<span class="org-highlight-numbers-number">00</span>
|
|
<span class="org-variable-name">Persistent</span>=true
|
|
<span class="org-variable-name">Unit</span>=braingit.service
|
|
|
|
[<span class="org-type">Install</span>]
|
|
<span class="org-variable-name">WantedBy</span>=default.target
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgd894d23" class="outline-3">
|
|
<h3 id="orgd894d23">Script</h3>
|
|
<div class="outline-text-3" id="text-orgd894d23">
|
|
<div class="org-src-container">
|
|
<pre class="src src-bash"><span class="org-type">cd</span> ~/Cloud/brain-website/
|
|
|
|
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span><span class="org-rainbow-delimiters-depth-2">[</span> <span class="org-negation-char">!</span> -z $<span class="org-rainbow-delimiters-depth-3">(</span><span class="org-sh-quoted-exec">git</span> status -s content/<span class="org-rainbow-delimiters-depth-3">)</span> <span class="org-rainbow-delimiters-depth-2">]</span><span class="org-rainbow-delimiters-depth-1">]</span>
|
|
<span class="org-keyword">then</span>
|
|
<span class="org-type">git</span> add content static && <span class="org-sh-escaped-newline">\</span>
|
|
<span class="org-type">git</span> commit -m <span class="org-string">"Update Content - </span><span class="org-string"><span class="org-sh-quoted-exec">$(</span></span><span class="org-sh-quoted-exec">date</span><span class="org-string"><span class="org-sh-quoted-exec"> +%F)</span></span><span class="org-string">"</span> && <span class="org-sh-escaped-newline">\</span>
|
|
<span class="org-type">git</span> push
|
|
<span class="org-keyword">exit</span>
|
|
<span class="org-keyword">fi</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="outline-container-orgcd55ae1" class="outline-2">
|
|
<h2 id="orgcd55ae1"><code>checkmail</code> - Check new mails</h2>
|
|
<div class="outline-text-2" id="text-orgcd55ae1">
|
|
</div>
|
|
<div id="outline-container-orgc063793" class="outline-3">
|
|
<h3 id="orgc063793">Service</h3>
|
|
<div class="outline-text-3" id="text-orgc063793">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">[<span class="org-type">Unit</span>]
|
|
<span class="org-variable-name">Description</span>=Check new mails
|
|
<span class="org-variable-name">RefuseManualStart</span>=no
|
|
<span class="org-variable-name">RefuseManualStop</span>=yes
|
|
|
|
[<span class="org-type">Service</span>]
|
|
<span class="org-variable-name">Type</span>=oneshot
|
|
<span class="org-variable-name">ExecStart</span>=%h/.local/bin/checkmail -q
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org81f3f11" class="outline-3">
|
|
<h3 id="org81f3f11">Timer</h3>
|
|
<div class="outline-text-3" id="text-org81f3f11">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">[<span class="org-type">Unit</span>]
|
|
<span class="org-variable-name">Description</span>=Check Mail every x minutes
|
|
<span class="org-variable-name">RefuseManualStart</span>=no
|
|
<span class="org-variable-name">RefuseManualStop</span>=no
|
|
<span class="org-variable-name">Wants</span>=network-online.target
|
|
<span class="org-variable-name">After</span>=network-online.target
|
|
<span class="org-variable-name">Requires</span>=checkmail.service
|
|
|
|
[<span class="org-type">Timer</span>]
|
|
<span class="org-variable-name">Persistent</span>=false
|
|
<span class="org-variable-name">OnBootSec</span>=2min
|
|
<span class="org-variable-name">OnUnitActiveSec</span>=5min
|
|
<span class="org-variable-name">AccuracySec</span>=2min
|
|
<span class="org-variable-name">Unit</span>=checkmail.service
|
|
|
|
[<span class="org-type">Install</span>]
|
|
<span class="org-variable-name">WantedBy</span>=default.target
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orga2cf44a" class="outline-3">
|
|
<h3 id="orga2cf44a">Script</h3>
|
|
<div class="outline-text-3" id="text-orga2cf44a">
|
|
<div class="org-src-container">
|
|
<pre class="src src-bash"><span class="org-keyword">while</span> <span class="org-rainbow-delimiters-depth-1">[</span> -n <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">1</span></span><span class="org-string">"</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">do</span> <span class="org-comment-delimiter"># </span><span class="org-comment">while loop starts</span>
|
|
<span class="org-keyword">case</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">1</span></span><span class="org-string">"</span><span class="org-keyword"> in</span>
|
|
-a) <span class="org-variable-name">opt_all</span>=<span class="org-string">'--all'</span> ;; <span class="org-comment-delimiter"># </span><span class="org-comment">Check All inboxes</span>
|
|
-v) <span class="org-variable-name">opt_verbose</span>=<span class="org-string">'--verbose'</span> ;; <span class="org-comment-delimiter"># </span><span class="org-comment">Verbose</span>
|
|
-q) <span class="org-variable-name">opt_quiet</span>=<span class="org-string">'--quiet'</span> ;; <span class="org-comment-delimiter"># </span><span class="org-comment">Quiet</span>
|
|
*) <span class="org-type">echo</span> <span class="org-string">"Option </span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">1</span></span><span class="org-string"> not recognized"</span> ;; <span class="org-comment-delimiter"># </span><span class="org-comment">In case you typed a different option</span>
|
|
<span class="org-keyword">esac</span>
|
|
<span class="org-builtin">shift</span>
|
|
<span class="org-keyword">done</span>
|
|
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">=============================================================</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Count number of mails</span>
|
|
<span class="org-variable-name">gmail_old</span>=<span class="org-string">"</span><span class="org-string"><span class="org-sh-quoted-exec">$(</span></span><span class="org-sh-quoted-exec">ls</span><span class="org-string"><span class="org-sh-quoted-exec"> ~/.mail/gmail/Inbox/new | wc -l)</span></span><span class="org-string">"</span>
|
|
<span class="org-variable-name">esrf_old</span>=<span class="org-string">"</span><span class="org-string"><span class="org-sh-quoted-exec">$(</span></span><span class="org-sh-quoted-exec">ls</span><span class="org-string"><span class="org-sh-quoted-exec"> ~/.mail/esrf/Inbox/new | wc -l)</span></span><span class="org-string">"</span>
|
|
<span class="org-variable-name">ulg_old</span>=<span class="org-string">"</span><span class="org-string"><span class="org-sh-quoted-exec">$(</span></span><span class="org-sh-quoted-exec">ls</span><span class="org-string"><span class="org-sh-quoted-exec"> ~/.mail/ulg/Inbox/new | wc -l)</span></span><span class="org-string">"</span>
|
|
<span class="org-variable-name">uliege_old</span>=<span class="org-string">"</span><span class="org-string"><span class="org-sh-quoted-exec">$(</span></span><span class="org-sh-quoted-exec">ls</span><span class="org-string"><span class="org-sh-quoted-exec"> ~/.mail/uliege/Inbox/new | wc -l)</span></span><span class="org-string">"</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">=============================================================</span>
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">=============================================================</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Retreive mails</span>
|
|
mbsync $<span class="org-variable-name">opt_all</span> $<span class="org-variable-name">opt_verbose</span> gmail-Home esrf-Home ulg-Home uliege-Home <span class="org-highlight-numbers-number">2</span>>/tmp/mbsync.log
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">=============================================================</span>
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">=============================================================</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Count number of mails</span>
|
|
<span class="org-variable-name">gmail_new</span>=<span class="org-string">"</span><span class="org-string"><span class="org-sh-quoted-exec">$(</span></span><span class="org-sh-quoted-exec">ls</span><span class="org-string"><span class="org-sh-quoted-exec"> ~/.mail/gmail/Inbox/new | wc -l)</span></span><span class="org-string">"</span>
|
|
<span class="org-variable-name">esrf_new</span>=<span class="org-string">"</span><span class="org-string"><span class="org-sh-quoted-exec">$(</span></span><span class="org-sh-quoted-exec">ls</span><span class="org-string"><span class="org-sh-quoted-exec"> ~/.mail/esrf/Inbox/new | wc -l)</span></span><span class="org-string">"</span>
|
|
<span class="org-variable-name">ulg_new</span>=<span class="org-string">"</span><span class="org-string"><span class="org-sh-quoted-exec">$(</span></span><span class="org-sh-quoted-exec">ls</span><span class="org-string"><span class="org-sh-quoted-exec"> ~/.mail/ulg/Inbox/new | wc -l)</span></span><span class="org-string">"</span>
|
|
<span class="org-variable-name">uliege_new</span>=<span class="org-string">"</span><span class="org-string"><span class="org-sh-quoted-exec">$(</span></span><span class="org-sh-quoted-exec">ls</span><span class="org-string"><span class="org-sh-quoted-exec"> ~/.mail/uliege/Inbox/new | wc -l)</span></span><span class="org-string">"</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">=============================================================</span>
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">=============================================================</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Total Number of new mails since last checking</span>
|
|
<span class="org-variable-name">new</span>=<span class="org-string">"</span><span class="org-string"><span class="org-sh-quoted-exec">$((</span></span><span class="org-string"><span class="org-constant"><span class="org-sh-quoted-exec">$</span></span></span><span class="org-string"><span class="org-variable-name"><span class="org-sh-quoted-exec">gmail_new</span></span></span><span class="org-string"><span class="org-sh-quoted-exec">+</span></span><span class="org-string"><span class="org-constant"><span class="org-sh-quoted-exec">$</span></span></span><span class="org-string"><span class="org-variable-name"><span class="org-sh-quoted-exec">esrf_new</span></span></span><span class="org-string"><span class="org-sh-quoted-exec">+</span></span><span class="org-string"><span class="org-constant"><span class="org-sh-quoted-exec">$</span></span></span><span class="org-string"><span class="org-variable-name"><span class="org-sh-quoted-exec">ulg_new</span></span></span><span class="org-string"><span class="org-sh-quoted-exec">+</span></span><span class="org-string"><span class="org-constant"><span class="org-sh-quoted-exec">$</span></span></span><span class="org-string"><span class="org-variable-name"><span class="org-sh-quoted-exec">uliege_new</span></span></span><span class="org-string"><span class="org-sh-quoted-exec">)</span></span><span class="org-string">)"</span>
|
|
<span class="org-variable-name">old</span>=<span class="org-string">"</span><span class="org-string"><span class="org-sh-quoted-exec">$((</span></span><span class="org-string"><span class="org-constant"><span class="org-sh-quoted-exec">$</span></span></span><span class="org-string"><span class="org-variable-name"><span class="org-sh-quoted-exec">gmail_old</span></span></span><span class="org-string"><span class="org-sh-quoted-exec">+</span></span><span class="org-string"><span class="org-constant"><span class="org-sh-quoted-exec">$</span></span></span><span class="org-string"><span class="org-variable-name"><span class="org-sh-quoted-exec">esrf_old</span></span></span><span class="org-string"><span class="org-sh-quoted-exec">+</span></span><span class="org-string"><span class="org-constant"><span class="org-sh-quoted-exec">$</span></span></span><span class="org-string"><span class="org-variable-name"><span class="org-sh-quoted-exec">ulg_old</span></span></span><span class="org-string"><span class="org-sh-quoted-exec">+</span></span><span class="org-string"><span class="org-constant"><span class="org-sh-quoted-exec">$</span></span></span><span class="org-string"><span class="org-variable-name"><span class="org-sh-quoted-exec">uliege_old</span></span></span><span class="org-string"><span class="org-sh-quoted-exec">)</span></span><span class="org-string">)"</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">=============================================================</span>
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">=============================================================</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Notification</span>
|
|
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">new</span></span><span class="org-string">"</span> -gt <span class="org-highlight-numbers-number">0</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
|
|
dunstify --replace=<span class="org-highlight-numbers-number">98465</span> <span class="org-string">'Mails '</span> <span class="org-string">"</span><span class="org-string"><span class="org-sh-quoted-exec">$((</span></span><span class="org-string"><span class="org-constant"><span class="org-sh-quoted-exec">$</span></span></span><span class="org-string"><span class="org-variable-name"><span class="org-sh-quoted-exec">gmail_new</span></span></span><span class="org-string"><span class="org-sh-quoted-exec">+</span></span><span class="org-string"><span class="org-constant"><span class="org-sh-quoted-exec">$</span></span></span><span class="org-string"><span class="org-variable-name"><span class="org-sh-quoted-exec">esrf_new</span></span></span><span class="org-string"><span class="org-sh-quoted-exec">+</span></span><span class="org-string"><span class="org-constant"><span class="org-sh-quoted-exec">$</span></span></span><span class="org-string"><span class="org-variable-name"><span class="org-sh-quoted-exec">ulg_new</span></span></span><span class="org-string"><span class="org-sh-quoted-exec">+</span></span><span class="org-string"><span class="org-constant"><span class="org-sh-quoted-exec">$</span></span></span><span class="org-string"><span class="org-variable-name"><span class="org-sh-quoted-exec">uliege_new</span></span></span><span class="org-string"><span class="org-sh-quoted-exec">)</span></span><span class="org-string">) new mail(s)"</span>
|
|
<span class="org-keyword">fi</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">=============================================================</span>
|
|
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">=============================================================</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Indexation and Tags</span>
|
|
<span class="org-keyword">if</span> <span class="org-type">pgrep</span> -f <span class="org-string">'mu server'</span>; <span class="org-keyword">then</span>
|
|
emacsclient --eval <span class="org-string">'(mu4e-update-index)'</span>
|
|
<span class="org-keyword">else</span>
|
|
mu index $<span class="org-variable-name">opt_verbose</span> $<span class="org-variable-name">opt_quiet</span>
|
|
<span class="org-keyword">fi</span>
|
|
<span class="org-comment-delimiter"># </span><span class="org-comment">=============================================================</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgb4148ce" class="outline-2">
|
|
<h2 id="orgb4148ce"><code>syncmail</code> - Synchronize all mails</h2>
|
|
<div class="outline-text-2" id="text-orgb4148ce">
|
|
</div>
|
|
<div id="outline-container-orgab0dd46" class="outline-3">
|
|
<h3 id="orgab0dd46">Service</h3>
|
|
<div class="outline-text-3" id="text-orgab0dd46">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">[<span class="org-type">Unit</span>]
|
|
<span class="org-variable-name">Description</span>=Sync all mails
|
|
<span class="org-variable-name">RefuseManualStart</span>=no
|
|
<span class="org-variable-name">RefuseManualStop</span>=yes
|
|
|
|
[<span class="org-type">Service</span>]
|
|
<span class="org-variable-name">Type</span>=oneshot
|
|
<span class="org-variable-name">ExecStart</span>=%h/.local/bin/checkmail -a -q
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org7b96d65" class="outline-3">
|
|
<h3 id="org7b96d65">Timer</h3>
|
|
<div class="outline-text-3" id="text-org7b96d65">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">[<span class="org-type">Unit</span>]
|
|
<span class="org-variable-name">Description</span>=Sync All Mails every x hours
|
|
<span class="org-variable-name">RefuseManualStart</span>=no
|
|
<span class="org-variable-name">RefuseManualStop</span>=no
|
|
<span class="org-variable-name">Wants</span>=network-online.target
|
|
<span class="org-variable-name">After</span>=network-online.target
|
|
<span class="org-variable-name">Requires</span>=syncmail.service
|
|
|
|
[<span class="org-type">Timer</span>]
|
|
<span class="org-variable-name">Persistent</span>=false
|
|
<span class="org-variable-name">OnBootSec</span>=30min
|
|
<span class="org-variable-name">OnUnitActiveSec</span>=300min
|
|
<span class="org-variable-name">AccuracySec</span>=10min
|
|
<span class="org-variable-name">Unit</span>=syncmail.service
|
|
|
|
[<span class="org-type">Install</span>]
|
|
<span class="org-variable-name">WantedBy</span>=default.target
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org64a5ff5" class="outline-2">
|
|
<h2 id="org64a5ff5"><code>vdirsyncer</code> - Synchronize calendar and contacts</h2>
|
|
<div class="outline-text-2" id="text-org64a5ff5">
|
|
</div>
|
|
<div id="outline-container-orgf2c8322" class="outline-3">
|
|
<h3 id="orgf2c8322">Service</h3>
|
|
<div class="outline-text-3" id="text-orgf2c8322">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">[<span class="org-type">Unit</span>]
|
|
<span class="org-variable-name">Description</span>=Synchronize calendars and contacts
|
|
<span class="org-variable-name">Documentation</span>=https://vdirsyncer.readthedocs.org/
|
|
<span class="org-variable-name">Wants</span>=network-online.target
|
|
<span class="org-variable-name">After</span>=network-online.target
|
|
|
|
[<span class="org-type">Service</span>]
|
|
<span class="org-variable-name">ExecStart</span>=/usr/bin/vdirsyncer --verbosity <span class="org-string">"ERROR"</span> sync
|
|
<span class="org-variable-name">Type</span>=oneshot
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org0f85a10" class="outline-3">
|
|
<h3 id="org0f85a10">Timer</h3>
|
|
<div class="outline-text-3" id="text-org0f85a10">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">[<span class="org-type">Unit</span>]
|
|
<span class="org-variable-name">Description</span>=Synchronize vdirs
|
|
|
|
[<span class="org-type">Timer</span>]
|
|
<span class="org-variable-name">OnBootSec</span>=5m
|
|
<span class="org-variable-name">OnUnitActiveSec</span>=15m
|
|
<span class="org-variable-name">AccuracySec</span>=5m
|
|
|
|
[<span class="org-type">Install</span>]
|
|
<span class="org-variable-name">WantedBy</span>=timers.target
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgea6990c" class="outline-2">
|
|
<h2 id="orgea6990c"><code>ssh-agent</code> - SSH Agent</h2>
|
|
<div class="outline-text-2" id="text-orgea6990c">
|
|
</div>
|
|
<div id="outline-container-org4390641" class="outline-3">
|
|
<h3 id="org4390641">Service</h3>
|
|
<div class="outline-text-3" id="text-org4390641">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">[<span class="org-type">Unit</span>]
|
|
<span class="org-variable-name">Description</span>=SSH key agent
|
|
|
|
[<span class="org-type">Service</span>]
|
|
<span class="org-variable-name">Type</span>=simple
|
|
<span class="org-variable-name">Environment</span>=SSH_AUTH_SOCK=%t/ssh-agent.socket
|
|
<span class="org-variable-name">ExecStart</span>=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
|
|
|
|
[<span class="org-type">Install</span>]
|
|
<span class="org-variable-name">WantedBy</span>=default.target
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org6c316cc" class="outline-2">
|
|
<h2 id="org6c316cc"><code>powertop</code> - Powertop</h2>
|
|
<div class="outline-text-2" id="text-org6c316cc">
|
|
</div>
|
|
<div id="outline-container-org782b2ab" class="outline-3">
|
|
<h3 id="org782b2ab">Service</h3>
|
|
<div class="outline-text-3" id="text-org782b2ab">
|
|
<div class="org-src-container">
|
|
<pre class="src src-conf">[<span class="org-type">Unit</span>]
|
|
<span class="org-variable-name">Description</span>=Powertop tunings
|
|
|
|
[<span class="org-type">Service</span>]
|
|
<span class="org-variable-name">ExecStart</span>=/usr/bin/powertop --auto-tune
|
|
<span class="org-variable-name">RemainAfterExit</span>=true
|
|
|
|
[<span class="org-type">Install</span>]
|
|
<span class="org-variable-name">WantedBy</span>=multi-user.target
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="postamble" class="status">
|
|
<p class="author">Author: Dehaeze Thomas</p>
|
|
<p class="date">Created: 2021-01-01 ven. 20:09</p>
|
|
</div>
|
|
</body>
|
|
</html>
|