<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="http://www.notomorrow.de/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>notomorrow.de code</title>
        <description></description>
        <link>http://www.notomorrow.de/</link>
        <lastBuildDate>Thu, 16 Apr 2026 07:25:48 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>http://www.notomorrow.de/ttp://www.notomorrow.de/lib/tpl/std/images/favicon.ico</url>
            <title>notomorrow.de</title>
            <link>http://www.notomorrow.de/</link>
        </image>
        <item>
            <title>code:audio</title>
            <link>http://www.notomorrow.de/code/audio?rev=1405362995</link>
            <description>&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;co0&quot;&gt;#!/bin/bash&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;# status: hurt me plenty   &amp;lt;- make a BACKUP!&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re2&quot;&gt;action&lt;/span&gt;=&lt;span class=&quot;co1&quot;&gt;${1-&#039;echo&#039;}&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;dir&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;$2&amp;quot;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;dir2&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;$3&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;find&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$dir&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-type&lt;/span&gt; f &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;read&lt;/span&gt; f; &lt;span class=&quot;kw1&quot;&gt;do&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;re2&quot;&gt;a&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;basename&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$f&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;re2&quot;&gt;dn&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;dirname&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$f&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co0&quot;&gt;#dokuwiki compatible filenames&lt;/span&gt;
    &lt;span class=&quot;re2&quot;&gt;b&lt;/span&gt;=&lt;span class=&quot;sy0&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;expr&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;xxx&lt;span class=&quot;es2&quot;&gt;$a&lt;/span&gt;&amp;quot;&lt;/span&gt; : &lt;span class=&quot;st_h&quot;&gt;&#039;xxx\(.*\)&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;s/@/at/&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;tr&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;[A-Z]&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;[a-z]&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;tr&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-cs&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;[:alnum:]_\-.\n&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;_&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;`&lt;/span&gt;
    &lt;span class=&quot;re2&quot;&gt;odir&lt;/span&gt;=&lt;span class=&quot;re1&quot;&gt;$dir2&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;${dn#$dir}&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$action&lt;/span&gt; == &lt;span class=&quot;st0&quot;&gt;&amp;quot;ffmpeg&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$odir&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;mkdir&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-p&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$odir&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;ffmpeg -y -i &amp;quot;&#039;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$f&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;&amp;quot; -acodec vorbis &amp;quot;&#039;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$odir&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/&#039;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$b&lt;/span&gt;.ogg&lt;span class=&quot;st_h&quot;&gt;&#039;&amp;quot;&#039;&lt;/span&gt;
        &lt;span class=&quot;co0&quot;&gt;#ffmpeg -ab 160k -y -i &amp;quot;$f&amp;quot; -acodec vorbis &amp;quot;$odir/$b.ogg&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;                                                                                                                                         
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$f&lt;/span&gt; -&amp;gt; &lt;span class=&quot;es2&quot;&gt;$odir&lt;/span&gt;/&lt;span class=&quot;es2&quot;&gt;$b&lt;/span&gt;.ogg&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
  &lt;span class=&quot;kw1&quot;&gt;done&lt;/span&gt;&lt;/pre&gt;
</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>code</category>
            <pubDate>Mon, 14 Jul 2014 18:36:35 +0000</pubDate>
        </item>
        <item>
            <title>code:bash</title>
            <link>http://www.notomorrow.de/code/bash?rev=1770304861</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;bash&quot;&gt;bash&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;bash&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;bash&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-19&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;bashrc&quot;&gt;bashrc&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;pre class=&quot;code&quot;&gt;# settings
TZ=&amp;#039;Europe/Berlin&amp;#039;; export TZ
# path
export PATH=&amp;quot;~/bin:/sbin:/usr/sbin:/usr/local/sbin:${PATH}&amp;quot;
export XDG_DATA_HOME=~/.config
export XDG_CACHE_HOME=~/.cache
# sys
[ -f ~/.bash_alias ] &amp;amp;&amp;amp; source ~/.bash_alias
[ -f /etc/profile.d/bash-completion ] &amp;amp;&amp;amp; source /etc/profile.d/bash-completion


# editor
set -o vi
export EDITOR=&amp;quot;vim&amp;quot;
umask 022

# history
export HISTFILESIZE=10000
export HISTSIZE=10000
shopt -s histappend
export HISTCONTROL=ignoredups
export LS_OPTIONS=&amp;#039;--color=auto&amp;#039;
eval `dircolors $HOME/.dircolors`

# start screen
if [[ $- = *i* &amp;amp;&amp;amp; -z &amp;quot;$STY&amp;quot; ]]; then exec screen -dR chat irssi; fi&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;bashrc&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;bashrc&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;20-665&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;snippets&quot;&gt;snippets&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;pre class=&quot;code&quot;&gt;# macros
  [ $1 ] || { echo -ne &amp;quot;\033[0m&amp;gt;&amp;gt;&amp;gt; usage: $0 &amp;lt;target&amp;gt;\n&amp;quot; &amp;gt;&amp;amp;2; exit 1; }&lt;/pre&gt;
&lt;pre class=&quot;code&quot;&gt;### pipes
## sqlite to html
  sqlite3 ex1 &amp;#039;select * from tbl1&amp;#039; | awk &amp;#039;{printf &amp;quot;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;%s&amp;lt;td&amp;gt;%s\n&amp;quot;,$1,$2 }&amp;#039;&lt;/pre&gt;
&lt;pre class=&quot;code&quot;&gt;### tools
## remove html
  lynx -dump &lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;snippets&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;snippets&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;666-934&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit4&quot; id=&quot;ipandgateway&quot;&gt;ip and gateway&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;pre class=&quot;code&quot;&gt;    while [ &amp;quot;x$INET_IPM&amp;quot; == &amp;quot;x&amp;quot; ]; do
       
      i=`ip a s wlan0 | grep &amp;quot;inet &amp;quot; | grep -v &amp;quot;169.254&amp;quot; | awk &amp;#039;{print $2}&amp;#039;`
      if [ &amp;quot;x$i&amp;quot; != &amp;quot;x&amp;quot; ]; then
        INET_IFACE=&amp;quot;wlan0&amp;quot;
        INET_IPM=&amp;quot;$i&amp;quot;
        break; fi
       
      i=`ip a s eth0 | grep &amp;quot;inet &amp;quot; | grep -v &amp;quot;169.254&amp;quot; | awk &amp;#039;{print $2}&amp;#039;`
      if [ &amp;quot;x$i&amp;quot; != &amp;quot;x&amp;quot; ]; then
        INET_IFACE=&amp;quot;eth0&amp;quot;
        INET_IPM=&amp;quot;$i&amp;quot;
        break; fi
       
      if [ &amp;quot;x$INET_IPM&amp;quot; == &amp;quot;x&amp;quot; ]; then                                                                                                           
        [ &amp;quot;x$wait&amp;quot; != &amp;quot;x&amp;quot; ] || echo -n &amp;quot;waiting for ip on $INET_IFACE ..&amp;quot;
        echo -n &amp;quot;.&amp;quot;
        wait=now
        sleep 3
      fi
    done
    echo
        
    INET_IP=${INET_IPM%/*}
    INET_GW=`ip r | grep default | awk &amp;#039;{print $3}&amp;#039;`
&lt;/pre&gt;

&lt;/div&gt;

&lt;h3 id=&quot;youtube-dl&quot;&gt;youtube-dl&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
* &lt;a href=&quot;https://github.com/rg3/youtube-dl.git&quot; class=&quot;urlextern&quot; title=&quot;https://github.com/rg3/youtube-dl.git&quot; rel=&quot;ugc nofollow&quot;&gt;https://github.com/rg3/youtube-dl.git&lt;/a&gt;
&lt;/p&gt;
&lt;dl class=&quot;file&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;http://www.notomorrow.de/_export/code/code/bash?codeblock=2&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_sh&quot;&gt;yt.sh&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code file bash&quot;&gt;&lt;span class=&quot;co0&quot;&gt;#!/bin/sh&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;COOKIE_FILE&lt;/span&gt;=&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;var&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;tmp&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;youtube-dl-cookies.txt
&lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; i &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;re4&quot;&gt;$*&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;kw2&quot;&gt;mplayer&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-cookies&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-cookies-file&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${COOKIE_FILE}&lt;/span&gt; $&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;youtube-dl &lt;span class=&quot;re5&quot;&gt;-g&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--cookies&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${COOKIE_FILE}&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;done&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;

&lt;h3 id=&quot;mysql&quot;&gt;mysql&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;pre class=&quot;code&quot;&gt;ex=&amp;#039;mysql -u root -pxxx mydb -e &amp;#039;
min() { echo $(( $1 &amp;lt; $2 ? $1 : $2 )); }
i=470;m=479; while [[ &amp;quot;$i&amp;quot; -le &amp;quot;$m&amp;quot; ]]; do 
  a=$i;b=$(min $((i+2)) $m);i=$((i+3));                                                                                                        
  $ex &amp;quot;insert into postlabel (fsid,lsid) values ($a, $b)&amp;quot;; done;
  
  &lt;/pre&gt;

&lt;p&gt;
echo “test?”
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;ip and gateway&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;ipandgateway&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;935-&amp;quot;} --&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>code</category>
            <pubDate>Thu, 05 Feb 2026 15:21:01 +0000</pubDate>
        </item>
        <item>
            <title>code:dokuwiki-sql</title>
            <link>http://www.notomorrow.de/code/dokuwiki-sql?rev=1581544425</link>
            <description>
&lt;p&gt;
sample preload.php snippet
&lt;/p&gt;
&lt;dl class=&quot;file&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;http://www.notomorrow.de/_export/code/code/dokuwiki-sql?codeblock=0&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_php&quot;&gt;preload.php&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code file php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$http_host&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$_SERVER&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;HTTP_HOST&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/strpos&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;strpos&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$http_host&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;:&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;a href=&quot;http://www.php.net/list&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;list&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$http_host&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$http_port&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/explode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;explode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;:&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$http_host&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$animal&lt;/span&gt;     &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;www.&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$http_host&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$request_id&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$_SERVER&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;REQUEST_URI&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;require_once&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$farmbasedir&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/conf/animal_alias.php&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// normalizes animal names and stuff&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$farmdir&lt;/span&gt;    &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es4&quot;&gt;$farmbasedir&lt;/span&gt;/domains/&lt;span class=&quot;es4&quot;&gt;$animal&lt;/span&gt;/&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$animal&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/is_dir&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;is_dir&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$farmdir&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
  &lt;span class=&quot;re0&quot;&gt;$animal&lt;/span&gt;     &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$farmer&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;re0&quot;&gt;$farmdir&lt;/span&gt;    &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es4&quot;&gt;$farmbasedir&lt;/span&gt;/domains/&lt;span class=&quot;es4&quot;&gt;$animal&lt;/span&gt;/&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/is_dir&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;is_dir&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$farmdir&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/die&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;die&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;nofarm&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;a href=&quot;http://www.php.net/define&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;define&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;FARMDIR&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$farmdir&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;DOKU_CONF&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/define&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;define&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;DOKU_CONF&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; DOKU_FARMDIR&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$animal&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/conf/&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;ACL_DOM&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/define&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;define&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;ACL_DOM&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$animal&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// for auth psql in .protected.php&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;ACL_TOPDOM&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/define&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;define&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;ACL_TOPDOM&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;notomorrow.de&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// for auth psql in .protected.php&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;DOKU_CONF_DEFAULT&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/define&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;define&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;DOKU_CONF_DEFAULT&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$farmbasedir&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/dokuwiki/conf/&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;DOKU_CONF&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/define&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;define&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;DOKU_CONF&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$farmdir&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;conf/&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;require_once&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$farmbasedir&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/dokuwiki/inc/config_cascade.php&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;require_once&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$farmbasedir&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/conf/cascade.php&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;p&gt;
sample farm.protected.php snippet
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;checkPass&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;   &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;SELECT pass
   FROM usergroup AS ug
     JOIN users AS u ON u.uid=ug.uid
     JOIN groups AS g ON g.gid=ug.gid
   WHERE u.login=&#039;%{user}&#039;
     AND g.name=&#039;%{dgroup}&#039;
     AND ( u.domain=&#039;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;ACL_DOM&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&#039; OR u.domain is null )
   &amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;getUserInfo&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;SELECT pass, fullname AS name, email AS mail
   FROM users
   WHERE lower(login)=lower(&#039;%{user}&#039;)
     AND ( domain=&#039;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;ACL_DOM&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&#039; OR domain is null )
   &amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;getGroups&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;   &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;SELECT g.name as group
   FROM groups g, users u, usergroup ug
  WHERE u.uid = ug.uid
    AND g.gid = ug.gid
    AND u.login=&#039;%{user}&#039;
    AND ( u.domain=&#039;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;ACL_DOM&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&#039; OR u.domain is null )
    &amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;getUsers&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;    &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;SELECT DISTINCT u.login AS user
   FROM users AS u 
      LEFT JOIN usergroup AS ug ON u.uid=ug.uid
      LEFT JOIN groups AS g ON ug.gid=g.gid
      WHERE ( u.domain=&#039;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;ACL_DOM&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&#039; &amp;quot;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; ACL_TOPDOM ? &lt;span class=&quot;st_h&quot;&gt;&#039;OR u.domain in ( \&#039;&amp;quot;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;a href=&quot;http://www.php.net/implode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;implode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&#039;,&#039;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/explode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;explode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;,&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; ACL_TOPDOM &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;\&#039; )&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;co2&quot;&gt;#.&amp;quot;OR u.domain is null&amp;quot;
&lt;/span&gt;        &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot; )&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;FilterLogin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;u.login LIKE &#039;%{user}&#039;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;                                                                                                                                                      
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;FilterName&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;u.fullname LIKE &#039;%{name}&#039;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;FilterEmail&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;u.email LIKE &#039;%{email}&#039;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;FilterGroup&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;g.name LIKE &#039;%{group}&#039;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;SortOrder&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;   &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;ORDER BY u.login&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;addUser&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;     &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;INSERT INTO users
    (login, pass, email, fullname, domain)
    VALUES (&#039;%{user}&#039;, &#039;%{pass}&#039;, &#039;%{email}&#039;, &#039;%{name}&#039;, &#039;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;ACL_DOM&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&#039;)&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;addGroup&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;    &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;INSERT INTO groups (name)                                                               
    VALUES (&#039;%{group}&#039;)&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;addUserGroup&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;INSERT INTO usergroup (uid, gid)
     VALUES (&#039;%{uid}&#039;, &#039;%{gid}&#039;)&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;delGroup&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;    &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM groups
    WHERE gid=&#039;%{gid}&#039;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;getUserID&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;   &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;SELECT uid AS id FROM users WHERE login=&#039;%{user}&#039;
    AND ( domain=&#039;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;ACL_DOM&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&#039; OR domain is null )&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;getGroupID&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;SELECT gid AS id FROM groups WHERE name=&#039;%{group}&#039;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;delUser&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;     &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM users
    WHERE uid=&#039;%{uid}&#039;
      AND ( domain=&#039;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;ACL_DOM&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&#039; )&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;delUserRefs&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM usergroup
      WHERE uid=&#039;%{uid}&#039;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;updateUser&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;UPDATE users SET&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;UpdateLogin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;login=&#039;%{user}&#039;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;                                                                       
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;UpdatePass&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;pass=&#039;%{pass}&#039;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;UpdateEmail&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;email=&#039;%{email}&#039;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;UpdateName&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;fullname=&#039;%{name}&#039;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;UpdateTarget&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;WHERE uid=%{uid}&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;plugin&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;authpgsql&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;delUserGroup&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM usergroup
      WHERE uid=&#039;%{uid}&#039;
        AND gid=&#039;%{gid}&#039;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>code</category>
            <pubDate>Wed, 12 Feb 2020 21:53:45 +0000</pubDate>
        </item>
        <item>
            <title>code:dokuwiki</title>
            <link>http://www.notomorrow.de/code/dokuwiki?rev=1511024403</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;dokuwiki&quot;&gt;Dokuwiki&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Dokuwiki&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;dokuwiki&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-146&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;install&quot;&gt;Install&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;git clone&lt;/span&gt; https:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;github.com&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;splitbrain&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dokuwiki.git
&lt;span class=&quot;kw2&quot;&gt;vim&lt;/span&gt; dokuwiki&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;inc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;preload.php
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;mkdir&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-p&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;var&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;lib&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dokuwiki&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;default&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;conf
&lt;span class=&quot;kw2&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;cp&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-r&lt;/span&gt; dokuwiki&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;data &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;var&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;lib&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dokuwiki&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;default
&lt;span class=&quot;kw2&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;cp&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-r&lt;/span&gt; dokuwiki&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;data &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;var&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;lib&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dokuwiki&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;default
&lt;span class=&quot;kw2&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;cp&lt;/span&gt; dokuwiki&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;conf&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;users.auth.php.dist &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;var&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;lib&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dokuwiki&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;default&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;conf&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;users.auth.php
&lt;span class=&quot;kw2&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;cp&lt;/span&gt; dokuwiki&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;conf&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;acl.auth.php.dist &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;var&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;lib&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dokuwiki&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;default&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;conf&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;acl.auth.php
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;sudo&lt;/span&gt; rsync &lt;span class=&quot;re5&quot;&gt;-avv&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--exclude&lt;/span&gt;=.git&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--exclude&lt;/span&gt;=&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;data &lt;span class=&quot;re5&quot;&gt;--exclude&lt;/span&gt;=install.php dokuwiki &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;var&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;www&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;chown&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-R&lt;/span&gt; apache:apache &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;var&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;lib&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dokuwiki&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;default&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;data
&lt;span class=&quot;kw2&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;chown&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-R&lt;/span&gt; apache:apache &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;var&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;lib&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dokuwiki&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;default&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;conf
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;yum install&lt;/span&gt; php
&lt;span class=&quot;kw2&quot;&gt;sudo&lt;/span&gt; service httpd restart&lt;/pre&gt;
&lt;dl class=&quot;file&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;http://www.notomorrow.de/_export/code/code/dokuwiki?codeblock=1&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_php&quot;&gt;preload.php&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code file php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;DOKU_FARMDIR&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/define&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;define&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;DOKU_FARMDIR&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/var/lib/dokuwiki/&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;DOKU_CONF&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/define&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;define&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;DOKU_CONF&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; DOKU_FARMDIR&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;default/conf/&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;  &lt;span class=&quot;co2&quot;&gt;## disableing dynamic path selection
&lt;/span&gt; 
&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;fullpath&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/dirname&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;dirname&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;__FILE__&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/farm.php&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;dl class=&quot;file&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;http://www.notomorrow.de/_export/code/code/dokuwiki?codeblock=2&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_php&quot;&gt;local.protected.php&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code file php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;savedir&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;     &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; DOKU_FARMDIR&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;default/data&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;useacl&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;     &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;autopasswd&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;     &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;superuser&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;     &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;alice,@admin&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;

&lt;h3 id=&quot;rewrites&quot;&gt;rewrites&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;dl class=&quot;file&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;http://www.notomorrow.de/_export/code/code/dokuwiki?codeblock=3&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_inc&quot;&gt;nginx/conf.d/dokuwiki.inc&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code file nginx&quot;&gt;  &lt;a href=&quot;http://wiki.nginx.org/NginxHttpIndexModule#index&quot;&gt;&lt;span class=&quot;kw15&quot;&gt;index&lt;/span&gt;&lt;/a&gt;  &lt;a href=&quot;http://wiki.nginx.org/NginxHttpIndexModule#index&quot;&gt;&lt;span class=&quot;kw15&quot;&gt;index&lt;/span&gt;&lt;/a&gt;.php &lt;a href=&quot;http://wiki.nginx.org/NginxHttpIndexModule#index&quot;&gt;&lt;span class=&quot;kw15&quot;&gt;index&lt;/span&gt;&lt;/a&gt;.html&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
  &lt;a href=&quot;http://wiki.nginx.org/NginxHttpCoreModule#client_max_body_size&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;client_max_body_size&lt;/span&gt;&lt;/a&gt; 1600m&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;a href=&quot;http://wiki.nginx.org/NginxHttpFcgiModule#fastcgi_read_timeout&quot;&gt;&lt;span class=&quot;kw11&quot;&gt;fastcgi_read_timeout&lt;/span&gt;&lt;/a&gt; 180&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
  &lt;a href=&quot;http://wiki.nginx.org/NginxHttpCoreModule#location&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;location&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;sy0&quot;&gt;~&lt;/span&gt; ^/&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;data|conf|bin|inc&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/ &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;a href=&quot;http://wiki.nginx.org/NginxHttpRewriteModule#return&quot;&gt;&lt;span class=&quot;kw24&quot;&gt;return&lt;/span&gt;&lt;/a&gt; 444&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  &lt;a href=&quot;http://wiki.nginx.org/NginxHttpCoreModule#location&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;location&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;sy0&quot;&gt;~&lt;/span&gt; /\.ht &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;a href=&quot;http://wiki.nginx.org/NginxHttpRewriteModule#return&quot;&gt;&lt;span class=&quot;kw24&quot;&gt;return&lt;/span&gt;&lt;/a&gt; 444&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
  &lt;a href=&quot;http://wiki.nginx.org/NginxHttpCoreModule#location&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;location&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; /favicon.ico &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;a href=&quot;http://wiki.nginx.org/NginxHttpCoreModule#log_not_found&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;log_not_found&lt;/span&gt;&lt;/a&gt; off&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;a href=&quot;http://wiki.nginx.org/NginxHttpLogModule#access_log&quot;&gt;&lt;span class=&quot;kw20&quot;&gt;access_log&lt;/span&gt;&lt;/a&gt; off&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;     
  &lt;a href=&quot;http://wiki.nginx.org/NginxHttpCoreModule#location&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;location&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; /robots.txt &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;a href=&quot;http://wiki.nginx.org/NginxHttpAccessModule#allow&quot;&gt;&lt;span class=&quot;kw5&quot;&gt;allow&lt;/span&gt;&lt;/a&gt; all&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;a href=&quot;http://wiki.nginx.org/NginxHttpCoreModule#log_not_found&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;log_not_found&lt;/span&gt;&lt;/a&gt; off&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;a href=&quot;http://wiki.nginx.org/NginxHttpLogModule#access_log&quot;&gt;&lt;span class=&quot;kw20&quot;&gt;access_log&lt;/span&gt;&lt;/a&gt; off&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  &lt;a href=&quot;http://wiki.nginx.org/NginxHttpCoreModule#location&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;location&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;sy0&quot;&gt;~&lt;/span&gt;* \.&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;txt|log&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;$ &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;a href=&quot;http://wiki.nginx.org/NginxHttpAccessModule#deny&quot;&gt;&lt;span class=&quot;kw5&quot;&gt;deny&lt;/span&gt;&lt;/a&gt; all&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  &lt;a href=&quot;http://wiki.nginx.org/NginxHttpCoreModule#location&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;location&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;sy0&quot;&gt;~&lt;/span&gt; \..*/.*\.php$ &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;a href=&quot;http://wiki.nginx.org/NginxHttpRewriteModule#return&quot;&gt;&lt;span class=&quot;kw24&quot;&gt;return&lt;/span&gt;&lt;/a&gt; 403&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  &lt;a href=&quot;http://wiki.nginx.org/NginxHttpCoreModule#location&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;location&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;sy0&quot;&gt;~&lt;/span&gt; /\.ht &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;a href=&quot;http://wiki.nginx.org/NginxHttpAccessModule#deny&quot;&gt;&lt;span class=&quot;kw5&quot;&gt;deny&lt;/span&gt;&lt;/a&gt;  all&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  &lt;a href=&quot;http://wiki.nginx.org/NginxHttpCoreModule#location&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;location&lt;/span&gt;&lt;/a&gt; / &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;  
    &lt;a href=&quot;http://wiki.nginx.org/NginxHttpCoreModule#try_files&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;try_files&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$uri&lt;/span&gt; @&lt;a href=&quot;http://wiki.nginx.org/NginxHttpRewriteModule#rewrite&quot;&gt;&lt;span class=&quot;kw24&quot;&gt;rewrite&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;       
&amp;nbsp;
  &lt;a href=&quot;http://wiki.nginx.org/NginxHttpCoreModule#location&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;location&lt;/span&gt;&lt;/a&gt; @&lt;a href=&quot;http://wiki.nginx.org/NginxHttpRewriteModule#rewrite&quot;&gt;&lt;span class=&quot;kw24&quot;&gt;rewrite&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
     &lt;a href=&quot;http://wiki.nginx.org/NginxHttpRewriteModule#rewrite&quot;&gt;&lt;span class=&quot;kw24&quot;&gt;rewrite&lt;/span&gt;&lt;/a&gt; ^/$ /doku.php last&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
     &lt;a href=&quot;http://wiki.nginx.org/NginxHttpRewriteModule#rewrite&quot;&gt;&lt;span class=&quot;kw24&quot;&gt;rewrite&lt;/span&gt;&lt;/a&gt; ^/_media/&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;.*&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;              /lib/exe/fetch.php?media&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;$1 last&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
     &lt;a href=&quot;http://wiki.nginx.org/NginxHttpRewriteModule#rewrite&quot;&gt;&lt;span class=&quot;kw24&quot;&gt;rewrite&lt;/span&gt;&lt;/a&gt; ^/_detail/&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;.*&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;             /lib/exe/detail.php?media&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;$1 last&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
     &lt;a href=&quot;http://wiki.nginx.org/NginxHttpRewriteModule#rewrite&quot;&gt;&lt;span class=&quot;kw24&quot;&gt;rewrite&lt;/span&gt;&lt;/a&gt; ^/_export/&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;^/&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;+&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;.*&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;     /doku.php?do&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;export_$1&amp;amp;id&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;$2 last&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;co1&quot;&gt;## styleimg is a template confhelper feature&lt;/span&gt;
     &lt;a href=&quot;http://wiki.nginx.org/NginxHttpRewriteModule#rewrite&quot;&gt;&lt;span class=&quot;kw24&quot;&gt;rewrite&lt;/span&gt;&lt;/a&gt; ^/_img/&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;.*&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;?&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;.*&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;        /lib/exe/fetch.php?mode&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;styleimg&amp;amp;media&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;$3&amp;amp;template&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;$2 last&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
     &lt;a href=&quot;http://wiki.nginx.org/NginxHttpRewriteModule#rewrite&quot;&gt;&lt;span class=&quot;kw24&quot;&gt;rewrite&lt;/span&gt;&lt;/a&gt; ^/images/&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;.*&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;?&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;.*&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;      /lib/exe/fetch.php?mode&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;styleimg&amp;amp;media&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;$3&amp;amp;template&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;$2 last&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;## force styleimage for template images ( out of root templates )&lt;/span&gt;
     &lt;a href=&quot;http://wiki.nginx.org/NginxHttpRewriteModule#rewrite&quot;&gt;&lt;span class=&quot;kw24&quot;&gt;rewrite&lt;/span&gt;&lt;/a&gt; ^/lib/tpl/&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;.*&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;/&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;?images/&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;.*&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;      /lib/exe/fetch.php?mode&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;styleimg&amp;amp;media&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;$3&amp;amp;template&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;$2 last&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
     &lt;a href=&quot;http://wiki.nginx.org/NginxHttpRewriteModule#rewrite&quot;&gt;&lt;span class=&quot;kw24&quot;&gt;rewrite&lt;/span&gt;&lt;/a&gt; ^/&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;.*&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;?&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;.*&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  /doku.php?id&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;$1&amp;amp;$2 last&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
     &lt;a href=&quot;http://wiki.nginx.org/NginxHttpRewriteModule#break&quot;&gt;&lt;span class=&quot;kw24&quot;&gt;break&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;       
 &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;

&lt;h3 id=&quot;php-fpm&quot;&gt;php-fpm&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
for reverse proxy setup see &lt;a href=&quot;http://www.notomorrow.de/code/notes/nginx&quot; class=&quot;wikilink1&quot; title=&quot;code:notes:nginx&quot; data-wiki-id=&quot;code:notes:nginx&quot;&gt;nginx&lt;/a&gt;
&lt;/p&gt;
&lt;dl class=&quot;file&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;http://www.notomorrow.de/_export/code/code/dokuwiki?codeblock=4&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_de&quot;&gt;/etc/nginx/sites-available-notomorrow.de&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code file nginx&quot;&gt;&lt;a href=&quot;http://wiki.nginx.org/NginxHttpCoreModule#client_max_body_size&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;client_max_body_size&lt;/span&gt;&lt;/a&gt; 50m&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;a href=&quot;http://wiki.nginx.org/NginxHttpFcgiModule#fastcgi_read_timeout&quot;&gt;&lt;span class=&quot;kw11&quot;&gt;fastcgi_read_timeout&lt;/span&gt;&lt;/a&gt; 180&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;## needed because of the reverse proxy&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;## x_forwarded port ans stuff is set there&lt;/span&gt;
&amp;nbsp;
&lt;a href=&quot;http://wiki.nginx.org/NginxHttpMapModule#map&quot;&gt;&lt;span class=&quot;kw21&quot;&gt;map&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$http_x_forwarded_port&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$external_port&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; 
    default &lt;span class=&quot;re0&quot;&gt;$http_x_forwarded_port&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;st0&quot;&gt;&#039;&#039;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$server_port&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;        
&lt;a href=&quot;http://wiki.nginx.org/NginxHttpMapModule#map&quot;&gt;&lt;span class=&quot;kw21&quot;&gt;map&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$http_x_forwarded_proto&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$external_proto&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; 
    &lt;span class=&quot;st0&quot;&gt;&#039;&#039;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$https&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;st0&quot;&gt;&#039;http&#039;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;st0&quot;&gt;&#039;https&#039;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&#039;on&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;        
&amp;nbsp;
&lt;a href=&quot;http://wiki.nginx.org/NginxHttpCoreModule#server&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;server&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; 
        &lt;a href=&quot;http://wiki.nginx.org/NginxHttpCoreModule#listen&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;listen&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;::&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:80 default&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;a href=&quot;http://wiki.nginx.org/NginxHttpCoreModule#server_name&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;server_name&lt;/span&gt;&lt;/a&gt; notomorrow.de *.notomorrow.de&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;a href=&quot;http://wiki.nginx.org/CoreModule#error_log&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;error_log&lt;/span&gt;&lt;/a&gt;  /var/log/nginx/notomorrow.error.log&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;a href=&quot;http://wiki.nginx.org/NginxHttpCoreModule#root&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;root&lt;/span&gt;&lt;/a&gt;   /srv/dokuwiki&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;a href=&quot;http://wiki.nginx.org/NginxHttpIndexModule#index&quot;&gt;&lt;span class=&quot;kw15&quot;&gt;index&lt;/span&gt;&lt;/a&gt;  &lt;a href=&quot;http://wiki.nginx.org/NginxHttpIndexModule#index&quot;&gt;&lt;span class=&quot;kw15&quot;&gt;index&lt;/span&gt;&lt;/a&gt;.php &lt;a href=&quot;http://wiki.nginx.org/NginxHttpIndexModule#index&quot;&gt;&lt;span class=&quot;kw15&quot;&gt;index&lt;/span&gt;&lt;/a&gt;.html&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;a href=&quot;http://wiki.nginx.org/CoreModule#include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt;        conf.d/status.inc&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;a href=&quot;http://wiki.nginx.org/CoreModule#include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt;        conf.d/public.inc&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;a href=&quot;http://wiki.nginx.org/CoreModule#include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt;        conf.d/dokuwiki.inc&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;a href=&quot;http://wiki.nginx.org/CoreModule#include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt;        conf.d/notomorrow.php.inc&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;dl class=&quot;file&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;http://www.notomorrow.de/_export/code/code/dokuwiki?codeblock=5&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_inc&quot;&gt;/etc/nginx/conf.d/php.inc&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code file nginx&quot;&gt;&lt;a href=&quot;http://wiki.nginx.org/NginxHttpCoreModule#location&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;location&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;sy0&quot;&gt;~&lt;/span&gt; \.php$ &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
  &lt;a href=&quot;http://wiki.nginx.org/NginxHttpFcgiModule#fastcgi_split_path_info&quot;&gt;&lt;span class=&quot;kw11&quot;&gt;fastcgi_split_path_info&lt;/span&gt;&lt;/a&gt; ^&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;.+\.php&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;/.+&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;$&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;a href=&quot;http://wiki.nginx.org/NginxHttpFcgiModule#fastcgi_index&quot;&gt;&lt;span class=&quot;kw11&quot;&gt;fastcgi_index&lt;/span&gt;&lt;/a&gt;  &lt;a href=&quot;http://wiki.nginx.org/NginxHttpIndexModule#index&quot;&gt;&lt;span class=&quot;kw15&quot;&gt;index&lt;/span&gt;&lt;/a&gt;.php&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;              
&amp;nbsp;
  &lt;span class=&quot;co1&quot;&gt;#fastcgi_param  PATH_INFO          $fastcgi_path_info;&lt;/span&gt;
  &lt;span class=&quot;co1&quot;&gt;#fastcgi_param  PATH_TRANSLATED    $document_root$fastcgi_path_info;&lt;/span&gt;
  &lt;span class=&quot;co1&quot;&gt;#fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;&lt;/span&gt;
&amp;nbsp;
  &lt;a href=&quot;http://wiki.nginx.org/CoreModule#include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; fastcgi_params&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;                
&amp;nbsp;
  &lt;a href=&quot;http://wiki.nginx.org/NginxHttpFcgiModule#fastcgi_param&quot;&gt;&lt;span class=&quot;kw11&quot;&gt;fastcgi_param&lt;/span&gt;&lt;/a&gt;  SERVER_PORT          &lt;span class=&quot;re0&quot;&gt;$external_port&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
  &lt;a href=&quot;http://wiki.nginx.org/NginxHttpFcgiModule#fastcgi_param&quot;&gt;&lt;span class=&quot;kw11&quot;&gt;fastcgi_param&lt;/span&gt;&lt;/a&gt;  HTTPS                &lt;span class=&quot;re0&quot;&gt;$external_proto&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
&amp;nbsp;
  &lt;a href=&quot;http://wiki.nginx.org/NginxHttpFcgiModule#fastcgi_intercept_errors&quot;&gt;&lt;span class=&quot;kw11&quot;&gt;fastcgi_intercept_errors&lt;/span&gt;&lt;/a&gt; on&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;           
  &lt;a href=&quot;http://wiki.nginx.org/NginxHttpFcgiModule#fastcgi_pass&quot;&gt;&lt;span class=&quot;kw11&quot;&gt;fastcgi_pass&lt;/span&gt;&lt;/a&gt; unix:/tmp/php-fpm-notomorrow.de.sock&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;    &lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;dl class=&quot;file&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;http://www.notomorrow.de/_export/code/code/dokuwiki?codeblock=6&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_conf&quot;&gt;/etc/php/fpm/pool.d/notomorrow.de.conf&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code file php&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;notomorrow&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;de&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&amp;nbsp;
user &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; notomorrow&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;de
group &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; notomorrow&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;de
listen&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;owner &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; notomorrow&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;de
listen&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;group &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; notomorrow&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;de
listen &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/tmp/php-fpm-notomorrow.de.sock&#039;&lt;/span&gt;
pm &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; dynamic
pm&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;max_children &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;
pm&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;start_servers &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;
pm&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;min_spare_servers &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
pm&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;max_spare_servers &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Install&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;install&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;147-&amp;quot;} --&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>code</category>
            <pubDate>Sat, 18 Nov 2017 17:00:03 +0000</pubDate>
        </item>
        <item>
            <title>code:irssi</title>
            <link>http://www.notomorrow.de/code/irssi?rev=1394668113</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;irssi&quot;&gt;irssi&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
commands with */* are to type in irssi. command with *#* in the shell.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;irssi&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;irssi&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-92&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;screen&quot;&gt;screen&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
you will want to run irssi in screen. Screen is a windomanager.
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://www.notomorrow.de/code/screen#shortintro&quot; class=&quot;wikilink2&quot; title=&quot;code:screen&quot; rel=&quot;nofollow&quot; data-wiki-id=&quot;code:screen&quot;&gt;shortintro&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1 node&quot;&gt;&lt;div class=&quot;li&quot;&gt; some commands:&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; [ctrl+a c]      # new window&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; [ctrl+a a]      # switch to last window (space ⇒ next,backspace previous)&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;screen&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;screen&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;93-336&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;otrend2endencryption&quot;&gt;OTR (end2end encryption)&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
load otr (first time)
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;/load otr
/statusbar window add otr&lt;/pre&gt;

&lt;p&gt;
Mailing list: otr-dev@lists.cypherpunks.ca
First of all, we strongly recommend to set this option to speed up any OTR commands or sessions.
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;/set cmd_queue_speed 1msec&lt;/pre&gt;

&lt;p&gt;
initialise encryption
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;/msg alice ?OTR?&lt;/pre&gt;

&lt;p&gt;
check fingerprint
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; lists all keys encountered for comparison to copy paste to your friends (there is no standardiced way for sharing keys)&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;code&quot;&gt;/otr contexts&lt;/pre&gt;

&lt;/div&gt;

&lt;h3 id=&quot;configure&quot;&gt;configure&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
configure irssi (in shell)
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;# echo &amp;quot;load otr&amp;quot; &amp;gt;&amp;gt; ~/.irssi/startup&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;OTR (end2end encryption)&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;otrend2endencryption&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;337-&amp;quot;} --&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>code</category>
            <pubDate>Wed, 12 Mar 2014 23:48:33 +0000</pubDate>
        </item>
        <item>
            <title>code:mysql</title>
            <link>http://www.notomorrow.de/code/mysql?rev=1435212297</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;mysql&quot;&gt;mysql&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;

&lt;h5 id=&quot;dump&quot;&gt;dump&lt;/h5&gt;
&lt;div class=&quot;level5&quot;&gt;
&lt;pre class=&quot;code&quot;&gt;mysqldump -p --no-data  --routines --triggers test allt &amp;gt; allt-data.sql&lt;/pre&gt;

&lt;/div&gt;

&lt;h5 id=&quot;exportimportsh&quot;&gt;export /import sh&lt;/h5&gt;
&lt;div class=&quot;level5&quot;&gt;
&lt;dl class=&quot;file&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;http://www.notomorrow.de/_export/code/code/mysql?codeblock=0&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_sh&quot;&gt;export.sh&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code file bash&quot;&gt;&lt;span class=&quot;re2&quot;&gt;fields_in&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;email&amp;quot;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;fields_out&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;@usr&amp;quot;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;file&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;/tmp/ca.csv&amp;quot;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;table&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;table&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;exporting &lt;span class=&quot;es2&quot;&gt;$fields_in&lt;/span&gt; from &lt;span class=&quot;es2&quot;&gt;$table&lt;/span&gt;&amp;quot;&lt;/span&gt;
mysql &lt;span class=&quot;re5&quot;&gt;-u&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-N&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;&amp;lt;&amp;lt; eof
  select $fields_in
  from $table                                                                                                                                
    into outfile &#039;$file&#039;                                                                                                                         
    fields enclosed by &#039;&amp;quot;&#039; terminated by &#039;;&#039; escaped by &#039;&amp;quot;&#039;
    lines terminated by &#039;\r\n&#039;;
eof&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;= &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;importing &lt;span class=&quot;es2&quot;&gt;$fields_out&lt;/span&gt; from &lt;span class=&quot;es2&quot;&gt;$file&lt;/span&gt;&amp;quot;&lt;/span&gt;
mysql &lt;span class=&quot;re5&quot;&gt;-u&lt;/span&gt; out &lt;span class=&quot;co2&quot;&gt;&amp;lt;&amp;lt; eof
  load data infile &#039;$file&#039; ignore into table usrs 
    fields enclosed by &#039;&amp;quot;&#039; terminated by &#039;;&#039; escaped by &#039;&amp;quot;&#039;
    lines terminated by &#039;\r\n&#039;
    ( $fields_out )
    set id = @id,
      usr = @usr;
eof&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;= &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;pre class=&quot;code&quot;&gt;
-- check charsets
SELECT * FROM information_schema.SCHEMATA S;

SELECT 
    CCSA.character_set_name,CCSA.collation_name,T.table_name 
  FROM information_schema.`TABLES` T,
       information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` CCSA 
  WHERE CCSA.collation_name = T.table_collation ;
 
SELECT table_schema, table_name, column_name, character_set_name 
  FROM information_schema.`COLUMNS` C;
&lt;/pre&gt;

&lt;p&gt;
== php
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;=== utterly complicated csv output
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;                                                                
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$db&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; mysqli&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;root&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;xxx&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;a&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;          
&lt;span class=&quot;re0&quot;&gt;$res&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$db&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;query&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;select * from t1 order by ide&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;                      
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$db_p&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; mysqli&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;root&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;xxx&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;b&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;                   
&lt;span class=&quot;re0&quot;&gt;$fp&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/fopen&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;fopen&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;php://output&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;w&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;                                    
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$row&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$res&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;fetch_assoc&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;                                
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$row&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;id&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;continue&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;                           
    &lt;span class=&quot;re0&quot;&gt;$res_p&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$db_p&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;query&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;select * from t2 where id = &#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$row&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;id&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$row_p&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$res_p&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;fetch_assoc&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;                                 
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$row_p&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;                                                   
        &lt;a href=&quot;http://www.php.net/fputcsv&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;fputcsv&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$fp&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;                                          
            &lt;span class=&quot;re0&quot;&gt;$row&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;id )); }}                                                                    
fclose($fp); &lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
=== primitive searchfield parsing
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; search&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$s&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;                                                                                                                   
&amp;nbsp;
        &lt;span class=&quot;re0&quot;&gt;$q&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$p&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$a&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;re0&quot;&gt;$s&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;*&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;%&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$s&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$s&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/explode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;explode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039; &#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$s&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$sv&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/strpos&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;strpos&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$sv&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;@&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                        &lt;span class=&quot;re0&quot;&gt;$q&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;tix.e like ?&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                        &lt;span class=&quot;re0&quot;&gt;$p&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;s&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                        &lt;span class=&quot;re0&quot;&gt;$a&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;%&lt;span class=&quot;es4&quot;&gt;$sv&lt;/span&gt;%&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                    &lt;span class=&quot;re0&quot;&gt;$qv&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                    &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;fn&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;ln&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$f&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                        &lt;span class=&quot;re0&quot;&gt;$qv&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es4&quot;&gt;$f&lt;/span&gt; like ?&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                        &lt;span class=&quot;re0&quot;&gt;$p&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;s&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                        &lt;span class=&quot;re0&quot;&gt;$a&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;%&lt;span class=&quot;es4&quot;&gt;$sv&lt;/span&gt;%&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
                    &lt;span class=&quot;re0&quot;&gt;$q&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;(&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;a href=&quot;http://www.php.net/implode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;implode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039; or &#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$qv&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;)&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$q&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;select tix.*, usrs.name as crewname from tix, usrs 
                where usrs.uname=tix.parent and (&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;a href=&quot;http://www.php.net/implode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;implode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039; and &#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$q&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;)&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$res&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;query&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$q&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$p&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$a&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$res&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>code</category>
            <pubDate>Thu, 25 Jun 2015 06:04:57 +0000</pubDate>
        </item>
        <item>
            <title>code:postgres</title>
            <link>http://www.notomorrow.de/code/postgres?rev=1410315274</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;postgresqlrepmgrscript&quot;&gt;Postgresql Repmgr Script&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
&lt;img src=&quot;http://www.notomorrow.de/lib/images/smileys/icon_exclaim.gif&quot; class=&quot;icon smiley&quot; alt=&quot;:!:&quot; /&gt;&lt;strong&gt;preview&lt;/strong&gt;&lt;img src=&quot;http://www.notomorrow.de/lib/images/smileys/icon_exclaim.gif&quot; class=&quot;icon smiley&quot; alt=&quot;:!:&quot; /&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; db setup clone and replication work&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; status view doesnt&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; loads of dead ends&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
&lt;img src=&quot;http://www.notomorrow.de/lib/images/smileys/fixme.gif&quot; class=&quot;icon smiley&quot; alt=&quot;FIXME&quot; /&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; ipranges bugy and useless &lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;http://www.notomorrow.de/_export/code/code/postgres?codeblock=0&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_sh&quot;&gt;pgnode.sh&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;co0&quot;&gt;#!/bin/bash&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;# env&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;PGBIN&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;/usr/pgsql-9.1/bin&amp;quot;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;PGCTL&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${PGBIN}&lt;/span&gt;/pg_ctl&amp;quot;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;INITDB&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${PGBIN}&lt;/span&gt;/initdb&amp;quot;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;PGBENCH&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${PGBIN}&lt;/span&gt;/pgbench -i -s 1&amp;quot;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;PSQL&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;psql -a -h /tmp&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re2&quot;&gt;REPMGR_USER&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;repmgr&amp;quot;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;REPMGR_DB&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;pgbench&amp;quot;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;REPMGR&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${PGBIN}&lt;/span&gt;/repmgr&amp;quot;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;REPMGRD&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${PGBIN}&lt;/span&gt;/repmgrd&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;#pgnode config&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;USER&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;alice&amp;quot;&lt;/span&gt;  &lt;span class=&quot;co0&quot;&gt;#owner of the postgres process&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;PREFIX&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;/home/alice/pg/env&amp;quot;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;NODE_CONF&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;/home/alice/pg/pgnode.conf&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;#cluster config&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;CLUSTER_NAME&lt;/span&gt;=sirius
&lt;span class=&quot;re2&quot;&gt;CLUSTER_PORT&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;5443&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;CLUSTER_IPRANGE&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;192.168.1.0/24&amp;quot;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;CLUSTER_IPRANGE2&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;192.168.2.0/24&amp;quot;&lt;/span&gt; &lt;span class=&quot;co0&quot;&gt;#FIXME, muesste mit einer range gehen&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;CLUSTER_IPRANGE3&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;10.10.1.0/24&amp;quot;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;CLUSTER_IPRANGE4&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;10.10.2.0/24&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;#cluster locations&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;DB_PATH&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${PREFIX}&lt;/span&gt;/var/lib/pgsql/&lt;span class=&quot;es3&quot;&gt;${CLUSTER_NAME}&lt;/span&gt;/data&amp;quot;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;DB_LOG&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${PREFIX}&lt;/span&gt;/var/lib/pgsql/&lt;span class=&quot;es3&quot;&gt;${CLUSTER_NAME}&lt;/span&gt;/log&amp;quot;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;DB_CONF&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${PREFIX}&lt;/span&gt;/var/lib/pgsql/&lt;span class=&quot;es3&quot;&gt;${CLUSTER_NAME}&lt;/span&gt;/repmgr&amp;quot;&lt;/span&gt;
&amp;nbsp;
  &lt;span class=&quot;co0&quot;&gt;#ui&lt;/span&gt;
  rerror&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; $&lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;; &lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  rinfo&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-ne&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;\033[1;30m&amp;gt;\033[0;33m&amp;gt;\033[1;33m&amp;gt; \033[0m&lt;span class=&quot;es3&quot;&gt;${@}&lt;/span&gt;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
  &lt;span class=&quot;co0&quot;&gt;#commands&lt;/span&gt;
  rpsql&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$PSQL&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-p&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$CLUSTER_PORT&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-U&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$USER&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$REPMGR_DB&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt;; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  rpsql_admin&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$PSQL&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-p&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$CLUSTER_PORT&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-U&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$USER&lt;/span&gt; template1 &lt;span class=&quot;re5&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt;; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  rpgctl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$PGCTL&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-D&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${DB_PATH}&lt;/span&gt; &lt;span class=&quot;re4&quot;&gt;$1&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$DB_LOG&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;pg.log &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  rpgctl_cmd&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$PGCTL&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-D&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${DB_PATH}&lt;/span&gt; &lt;span class=&quot;re4&quot;&gt;$1&lt;/span&gt;; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  rpgbench&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$PGBENCH&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$REPMGR_DB&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-h&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;tmp &lt;span class=&quot;re5&quot;&gt;-p&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${CLUSTER_PORT}&lt;/span&gt;; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
 rrepmgrd&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;PGENGINE&lt;/span&gt;=&lt;span class=&quot;re1&quot;&gt;$PGBIN&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;PATH&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$PATH&lt;/span&gt;:&lt;span class=&quot;es2&quot;&gt;$PGENGINE&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$REPMGRD&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${DB_CONF}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$db&lt;/span&gt;.repmgr.conf &lt;span class=&quot;re5&quot;&gt;--monitoring-history&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--verbose&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${DB_LOG}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;repmgr.log &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  rrepmgrd_log&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;tail&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${DB_LOG}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/*&lt;/span&gt;; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  rrepmgrd_stop&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; pkill repmgrd; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  rrepmgr&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;PGENGINE&lt;/span&gt;=&lt;span class=&quot;re1&quot;&gt;$PGBIN&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;PATH&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$PATH&lt;/span&gt;:&lt;span class=&quot;es2&quot;&gt;$PGENGINE&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$REPMGR&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${DB_CONF}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$db&lt;/span&gt;.repmgr.conf &lt;span class=&quot;re5&quot;&gt;--verbose&lt;/span&gt; $&lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  rrepmgr_asrepmgr&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;PGENGINE&lt;/span&gt;=&lt;span class=&quot;re1&quot;&gt;$PGBIN&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;PATH&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$PATH&lt;/span&gt;:&lt;span class=&quot;es2&quot;&gt;$PGENGINE&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$REPMGR&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${DB_CONF}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$db&lt;/span&gt;.repmgr.conf &lt;span class=&quot;re5&quot;&gt;-U&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${REPMGR_USER}&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--verbose&lt;/span&gt; $&lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  rrepmgr_clone&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;PGENGINE&lt;/span&gt;=&lt;span class=&quot;re1&quot;&gt;$PGBIN&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;PATH&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$PATH&lt;/span&gt;:&lt;span class=&quot;es2&quot;&gt;$PGENGINE&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$REPMGR&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-D&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${DB_PATH}&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${REPMGR_DB}&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-p&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${CLUSTER_PORT}&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-U&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${REPMGR_USER}&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-R&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${USER}&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--verbose&lt;/span&gt; $&lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
  &lt;span class=&quot;co0&quot;&gt;##config (#TODO: use templates)&lt;/span&gt;
  configure_node&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$db&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;db&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;hostname&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    rinfo &lt;span class=&quot;st0&quot;&gt;&amp;quot;configure nodename &lt;span class=&quot;es2&quot;&gt;$db&lt;/span&gt;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;cat&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;&amp;lt;&amp;lt;-NEWNODE
db=$db
NEWNODE&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$NODE_CONF&lt;/span&gt;; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
  configure_cluster&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    rinfo &lt;span class=&quot;st0&quot;&gt;&amp;quot;configure cluster &lt;span class=&quot;es3&quot;&gt;${CLUSTER_NAME}&lt;/span&gt; (port: &lt;span class=&quot;es3&quot;&gt;${CLUSTER_PORT}&lt;/span&gt;)&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;cat&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;&amp;lt;&amp;lt;-NEWPORT
listen_addresses=&#039;*&#039;
wal_level = &#039;hot_standby&#039;
archive_mode = on
archive_command = &#039;exit 0&#039; # Managed by repmgr
max_wal_senders = 10
wal_keep_segments = 640     # 10 GB required on pg_xlog
#wal_keep_segments = 5000     # 80 GB required on pg_xlog
hot_standby = on
unix_socket_directory = &#039;/tmp&#039;
log_directory = &#039;pg_log&#039;
external_pid_file = &#039;postgres.pid&#039;
port=$CLUSTER_PORT
NEWPORT&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${DB_PATH}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;postgresql.conf;                                                                                                              
    rinfo &lt;span class=&quot;st0&quot;&gt;&amp;quot;configure permissions &lt;span class=&quot;es3&quot;&gt;${REPMGR_USER}&lt;/span&gt;@&lt;span class=&quot;es3&quot;&gt;${CLUSTER_IPRANGE}&lt;/span&gt;&amp;quot;&lt;/span&gt;
    rinfo &lt;span class=&quot;st0&quot;&gt;&amp;quot;configure permissions &lt;span class=&quot;es3&quot;&gt;${USER}&lt;/span&gt;@&lt;span class=&quot;es3&quot;&gt;${CLUSTER_IPRANGE}&lt;/span&gt;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;cat&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;&amp;lt;&amp;lt;-DB1
local   all     $USER                                ident
host    all     $USER        127.0.0.1/32            ident
host    all     $USER        $CLUSTER_IPRANGE        trust
host    all     $USER        $CLUSTER_IPRANGE2        trust
host    all     $USER        $CLUSTER_IPRANGE3        trust
host    all     $USER        $CLUSTER_IPRANGE4        trust
host    all     $USER        ::1/128                 ident
host    ${REPMGR_DB}     ${REPMGR_USER}        127.0.0.1/32            trust
host    ${REPMGR_DB}     ${REPMGR_USER}        $CLUSTER_IPRANGE        trust
host    ${REPMGR_DB}     ${REPMGR_USER}        $CLUSTER_IPRANGE2        trust
host    ${REPMGR_DB}     ${REPMGR_USER}        $CLUSTER_IPRANGE3        trust
host    ${REPMGR_DB}     ${REPMGR_USER}        $CLUSTER_IPRANGE4        trust
host    ${REPMGR_DB}     ${REPMGR_USER}        ::1/128                 trust
host    replication     ${REPMGR_USER}        127.0.0.1/32            trust
host    replication     ${REPMGR_USER}        $CLUSTER_IPRANGE        trust
host    replication     ${REPMGR_USER}        $CLUSTER_IPRANGE2        trust
host    replication     ${REPMGR_USER}        $CLUSTER_IPRANGE3        trust
host    replication     ${REPMGR_USER}        $CLUSTER_IPRANGE4        trust
host    replication     ${REPMGR_USER}        ::1/128                 trust
DB1&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${DB_PATH}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;pg_hba.conf; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
  configure_repmgr&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    rinfo &lt;span class=&quot;st0&quot;&gt;&amp;quot;configure replication &lt;span class=&quot;es3&quot;&gt;${DB_CONF}&lt;/span&gt;/&lt;span class=&quot;es2&quot;&gt;$db&lt;/span&gt;.repmgr.conf&amp;quot;&lt;/span&gt;
    rinfo &lt;span class=&quot;st0&quot;&gt;&amp;quot;conninfo=&#039;host=&lt;span class=&quot;es2&quot;&gt;$db&lt;/span&gt; user=&lt;span class=&quot;es3&quot;&gt;${REPMGR_USER}&lt;/span&gt; dbname=pgbench port=&lt;span class=&quot;es3&quot;&gt;${CLUSTER_PORT}&lt;/span&gt;&#039;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;cat&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;&amp;lt;&amp;lt;-RMC
cluster=${CLUSTER_NAME}
node=$db
node_name=$db
conninfo=&#039;host=$db user=${REPMGR_USER} dbname=pgbench port=${CLUSTER_PORT}&#039;
master_response_timeout=60
reconnect_attempts=6
reconnect_interval=10
failover=automatic
priority=-1
promote_command=&#039;$REPMGR standby promote -f ${REPMGR_CONF}/$db.repmgr.conf&#039;
follow_command=&#039;$REPMGR standby follow -f ${REPMGR_CONF}/$db.repmgr.conf -W&#039;
RMC&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${DB_CONF}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$db&lt;/span&gt;.repmgr.conf; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;# master script                                                                                                                                  &lt;/span&gt;
&amp;nbsp;
  &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$NODE_CONF&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;source&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$NODE_CONF&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$db&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt; configure_node
&amp;nbsp;
  rinfo &lt;span class=&quot;st0&quot;&gt;&amp;quot;pgnode &lt;span class=&quot;es2&quot;&gt;$db&lt;/span&gt;&amp;quot;&lt;/span&gt;
  rinfo &lt;span class=&quot;st0&quot;&gt;&amp;quot;cluster: **&lt;span class=&quot;es3&quot;&gt;${CLUSTER_NAME}&lt;/span&gt;** (&lt;span class=&quot;es3&quot;&gt;${REPMGR_USER}&lt;/span&gt;@&lt;span class=&quot;es3&quot;&gt;${CLUSTER_IPRANGE}&lt;/span&gt;:&lt;span class=&quot;es3&quot;&gt;${CLUSTER_PORT}&lt;/span&gt;)&amp;quot;&lt;/span&gt;
  rinfo &lt;span class=&quot;st0&quot;&gt;&amp;quot;db: &lt;span class=&quot;es2&quot;&gt;$DB_PATH&lt;/span&gt;&amp;quot;&lt;/span&gt;
&amp;nbsp;
run&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
&amp;nbsp;
  &lt;span class=&quot;re2&quot;&gt;action&lt;/span&gt;=&lt;span class=&quot;re4&quot;&gt;$1&lt;/span&gt;
  &lt;span class=&quot;kw3&quot;&gt;shift&lt;/span&gt;
&amp;nbsp;
  &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$action&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt;
    createdb&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
      &lt;span class=&quot;re1&quot;&gt;$INITDB&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${DB_PATH}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;
      &lt;span class=&quot;kw2&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${DB_LOG}&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
    configuredb&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
      configure_cluster &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
    initdb&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
      rpsql_admin &lt;span class=&quot;st0&quot;&gt;&amp;quot;create database &lt;span class=&quot;es2&quot;&gt;$REPMGR_DB&lt;/span&gt;&amp;quot;&lt;/span&gt;
      rpsql_admin &lt;span class=&quot;st0&quot;&gt;&amp;quot;create role &lt;span class=&quot;es3&quot;&gt;${REPMGR_USER}&lt;/span&gt; login superuser&amp;quot;&lt;/span&gt;
      rpsql_admin &lt;span class=&quot;st0&quot;&gt;&amp;quot;create role &lt;span class=&quot;es3&quot;&gt;${USER}&lt;/span&gt; login superuser&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
    db&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
      &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt; rerror &lt;span class=&quot;st0&quot;&gt;&amp;quot;$0 &lt;span class=&quot;es2&quot;&gt;$action&lt;/span&gt; &amp;lt;cmd&amp;gt;&amp;quot;&lt;/span&gt;
      rpgctl $&lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
    removedb&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
      rpgctl stop
      &lt;span class=&quot;kw2&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-vr&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$DB_PATH&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
&amp;nbsp;
    bench&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; rpgbench &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
&amp;nbsp;
    clone&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
      &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt; rerror &lt;span class=&quot;st0&quot;&gt;&amp;quot;$0 &lt;span class=&quot;es2&quot;&gt;$action&lt;/span&gt; &amp;lt;node&amp;gt;&amp;quot;&lt;/span&gt;
      rrepmgr_clone standby clone &lt;span class=&quot;re4&quot;&gt;$1&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
    forceclone&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
      &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt; rerror &lt;span class=&quot;st0&quot;&gt;&amp;quot;$0 &lt;span class=&quot;es2&quot;&gt;$action&lt;/span&gt; &amp;lt;node&amp;gt;&amp;quot;&lt;/span&gt;
      rrepmgr_clone &lt;span class=&quot;re5&quot;&gt;--force&lt;/span&gt; standby clone &lt;span class=&quot;re4&quot;&gt;$1&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
&amp;nbsp;
    configure&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
      &lt;span class=&quot;kw2&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${DB_LOG}&lt;/span&gt;
      &lt;span class=&quot;kw2&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${DB_CONF}&lt;/span&gt;
      configure_repmgr &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
&amp;nbsp;
    standby&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt; rerror &lt;span class=&quot;st0&quot;&gt;&amp;quot;$0 &lt;span class=&quot;es2&quot;&gt;$action&lt;/span&gt; &amp;lt;register,clone,follow,promote&amp;gt;&amp;quot;&lt;/span&gt;
      rrepmgr standby $&lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
    master&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt; rerror &lt;span class=&quot;st0&quot;&gt;&amp;quot;$0 &lt;span class=&quot;es2&quot;&gt;$action&lt;/span&gt; &amp;lt;register&amp;gt;&amp;quot;&lt;/span&gt;
      rrepmgr master $&lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
    cluster&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt; rerror &lt;span class=&quot;st0&quot;&gt;&amp;quot;$0 &lt;span class=&quot;es2&quot;&gt;$action&lt;/span&gt; &amp;lt;show,cleanup&amp;gt;&amp;quot;&lt;/span&gt;
      rrepmgr master $&lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
&amp;nbsp;
    start&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
      rrepmgrd &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
    stop&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
      rrepmgrd_stop &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
    monitor&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
      rrepmgrd_log &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
    status&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
      &lt;span class=&quot;co0&quot;&gt;#rpsql &amp;quot;select * from repmgr_${CLUSTER_NAME}.repl_monitor&amp;quot;&lt;/span&gt;
      rpsql &lt;span class=&quot;st0&quot;&gt;&amp;quot;select * from repmgr_&lt;span class=&quot;es3&quot;&gt;${CLUSTER_NAME}&lt;/span&gt;.repl_nodes&amp;quot;&lt;/span&gt;
      rpsql &lt;span class=&quot;st0&quot;&gt;&amp;quot;select * from repmgr_&lt;span class=&quot;es3&quot;&gt;${CLUSTER_NAME}&lt;/span&gt;.repl_status&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
    cleanup&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
      rrepmgr cluster cleanup &lt;span class=&quot;re5&quot;&gt;-k&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
      &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$0 &amp;lt;createdb,configouredb,removedb,db,init,status,bench&amp;gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
  &lt;span class=&quot;kw1&quot;&gt;esac&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
run $&lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;
&amp;nbsp;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>code</category>
            <pubDate>Wed, 10 Sep 2014 02:14:34 +0000</pubDate>
        </item>
        <item>
            <title>code:rsyslogd</title>
            <link>http://www.notomorrow.de/code/rsyslogd?rev=1396915758</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;rsyslogd&quot;&gt;rsyslogd&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;rsyslogd&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;rsyslogd&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-24&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;remotelogs&quot;&gt;remote logs&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
server:
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;--snip--
$ModLoad imudp
$UDPServerAddress 10.5.0.70
$UDPServerRun 5140
--snip--&lt;/pre&gt;

&lt;p&gt;
client
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;--snip--
#### custom RULES ####
auth,authpriv.*                 /var/log/auth.log
auth,authpriv.*                 ~

*.*     @10.5.0.70:5140

if $syslogfacility-text == &amp;#039;local6&amp;#039; and $programname == &amp;#039;apache2&amp;#039; then /var/rlog/httpd-access.log
if $syslogfacility-text == &amp;#039;local6&amp;#039; and $programname == &amp;#039;apache2&amp;#039; then ~
if $syslogfacility-text == &amp;#039;local7&amp;#039; and $programname == &amp;#039;apache2&amp;#039; then /var/rlog/httpd-error.log
if $syslogfacility-text == &amp;#039;local7&amp;#039; and $programname == &amp;#039;apache2&amp;#039; then ~

$IncludeConfig /etc/rsyslog.d/*.conf

#### RULES ####

#
# First some standard log files.  Log by facility.
#
*.*;auth,authpriv.none          -/var/log/syslog

#cron.*                         /var/log/cron.log
daemon.*                        -/var/log/daemon.log
kern.*                          -/var/log/kern.log
lpr.*                           -/var/log/lpr.log
mail.*                          -/var/log/mail.log
user.*                          -/var/log/user.log&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;remote logs&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;remotelogs&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;25-&amp;quot;} --&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>code</category>
            <pubDate>Tue, 08 Apr 2014 00:09:18 +0000</pubDate>
        </item>
    </channel>
</rss>
