title: How to escape a systemd Specifier to pass to the command in ExecStart
body: <p>I've written the following systemd service <code>tcpdumpd.service</code> to kick off a persistent tcpdump recording.</p>
  
  <pre><code>[Unit]
  Description=TCPDumpd
  After=multi-user.target network.target
  
  [Service]
  Type=simple
  ExecStart=/usr/sbin/tcpdump -pni eth0 -s65535 -G 3600 -w '/var/log/tcpdump/trace_%Y-%m-%d_%H:%M:%S.pcap' -z gzip
  Restart=on-abort
  
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  
  <p>tcpdump allows strftime-placeholders like %H for hour, %M for minute and so on to allow you to create time stamped files.</p>
  
  <p>However, systemd has special specifiers than can be used in it, like (%n, %N, %p, %i, %U, %u, %m, %H, %b, %v)  So any of the specifiers that overlap, like %m and %H pass through the information from systemd and don't allow the placeholder to be passed through to tcpdump to make the time stamp.</p>
  
  <p>Does anyone know if there is a way to escape the specifiers in systemd so I can pass the %m and %H through to tcpdump?     </p>