Commit eba8a071 authored by Daniel Stan's avatar Daniel Stan

(stretch) apt-dater uses xml config and tmux

parent 16764f90
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE apt-dater SYSTEM "file:///usr/share/xml/schema/apt-dater/apt-dater.dtd">
<apt-dater xmlns:xi="http://www.w3.org/2001/XInclude">
<!-- Include global config file if available. -->
<xi:include href="file:///etc/apt-dater/apt-dater.xml" xpointer="xpointer(/apt-dater/*)">
<xi:fallback />
</xi:include>
<!--
SSH(1) options
<ssh
cmd="/usr/bin/ssh"
opt-cmd-flags="-t"
sftp-cmd="/usr/bin/sftp"
spawn-agent="false">
<add-key fn="/path/to/id_rsa1"/>
<add-key fn="/path/to/id_rsa2"/>
</ssh>
-->
<!--
Path to hosts file and status directory.
<paths
hosts-file="path-to/hosts.xml"
history-dir="path-to/history/"
stats-dir="path-to/stats"/>
-->
<!--
SCREEN(1) options
<screen
rc-file="path-to/screenrc"
title="%m # %u@%h:%p"/>
-->
<!--
TMUX(1) options
<tmux
socket-path="path-to/tmux"/>
-->
<!--
Colors = (COMPONENT FG BG ';')*
COMPONENT ::= 'default' | 'menu' | 'status' | 'selector' | 'hoststatus' |
'query' | 'input'
FG ::= COLOR
BG ::= COLOR
COLOR ::= 'black' | 'blue' | 'cyan' | 'green' | 'magenta' | 'red' |
'white' | 'yellow'
<appearance:
colors="menu brightgreen blue;status brightgreen blue;selector black red;"/>
-->
<!--
Notify user by terminal bell and/or screen flash.
<notify
beep="true"
flash="true"/>
-->
<!--
plugin-dir : directory containing host plugins
(pre|post)-*: run hooks before or after executing an action on a host
<hooks
pluginDir="/etc/apt-dater/plugins";
pre-upgrade="/etc/apt-dater/pre-upg.d"
post-upgrade="/etc/apt-dater/post-upg.d"
pre-refresh="/etc/apt-dater/pre-ref.d"
post-refresh="/etc/apt-dater/post-ref.d"
pre-install="/etc/apt-dater/pre-ins.d"
post-install="/etc/apt-dater/post-ins.d"
pre-connect="/etc/apt-dater/pre-con.d"
post-connect="/etc/apt-dater/post-con.d"/>
-->
<!--
Requires apt-dater to be build with enable-autoref.
<auto-ref
enabled="true"/>
-->
<!--
Requires apt-dater to be build with enable-history.
<history
record="true"
err-pattern="((?&lt;!no )error|(?&lt;!insserv: )warning|fail(ed)?)"/>
-->
<!--
Requires apt-dater to be build with enable-tclfilter.
<tcl-filter
filter-exp="return [expr [string compare $lsb_distri \\\"Debian\\\"] == 0 && $lsb_rel < 4.0]"
filter-file="/path/to/file.tcl" />
-->
</apt-dater>
<!DOCTYPE hosts SYSTEM "file:///usr/share/xml/schema/apt-dater/hosts.dtd">
<!--
Hosts file of apt-dater (parsed by libxml2)
===========================================
hosts.xml configures the hosts which are managed by
apt-dater. Host options (except 'name') are lookuped as attributes
at the host node itself, the parent group node and the global
/hosts/default node.
The following attributes are known:
- name : visible name of the host or group (required)
- comment : text shown in 'host details' screen
- type : transport type (default: 'generic-ssh')
- ssh-user: overwrite SSH username
- ssh-host: overwrite SSH host (defaults to @name)
- ssh-port: overwrite SSH port
- ssh-id : overwrite SSH identification file
Example:
<hosts>
<default ssh-user="admin"/>
<group name="Internal Hosts" ssh-user="root">
<host name="server1.internal"/>
<host name="server2.internal"/>
<host name="John's Machine" ssh-host="workstation.internal" />
</group>
<group name="External Hosts">
<host name="external.ibh.net" ssh-port="443"/>
</group>
...
</hosts>
-->
<hosts xmlns:xi="http://www.w3.org/2001/XInclude">
<!-- Include global config file if available. -->
<xi:include href="file:///etc/apt-dater/hosts.xml" xpointer="xpointer(/hosts/*)">
<xi:fallback />
</xi:include>
<group name="Tudor">
<host name="boudoir.tudo.re" ssh-user="apt-dater" />
<host name="cupcake.tudo.re" ssh-user="apt-dater" />
<host name="gigapudding.crans.org" ssh-user="apt-dater" />
<host name="home.b2moo.fr" ssh-user="apt-dater" />
<host name="kugel.tudo.re" ssh-user="apt-dater" />
<host name="localhost" ssh-user="apt-dater" />
</group>
</hosts>
# Use C-a as alternative prefix (like GNU screen)
set-option -g prefix2 C-a
# Make C-a C-a to send C-a inside
bind-key C-a send-prefix -2
# Allow faster key repetition
set -s escape-time 0
# Fix scrolling
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set-option -g history-limit 10000
set-option -g set-remain-on-exit on
# Make C-a q kill the pane (simular to GNU screen)
bind-key q confirm-before -p "kill-pane #P? (y/n)" kill-pane
# tmux >=2.2: does always use utf8, keep the option older environments
# using tmux <2.2 (i.e. Debian Jessie)
set -gq status-utf8 on
set -g status-bg blue
set -g status-fg brightgreen
set -g status-justify right
set -g status-left '%R '
set -g status-right ''
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment