Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tips:ubuntu:locale [2016/12/27 07:42] – scipio | tips:ubuntu:locale [2018/02/08 17:12] (current) – scipio | ||
---|---|---|---|
Line 3: | Line 3: | ||
<code bash> | <code bash> | ||
apt install -y curl && \ | apt install -y curl && \ | ||
- | curl -s " | + | curl -s " |
</ | </ | ||
Line 12: | Line 12: | ||
locale-gen en_US.UTF-8 | locale-gen en_US.UTF-8 | ||
update-locale LANG=it_IT.UTF-8 LC_MESSAGES=POSIX | update-locale LANG=it_IT.UTF-8 LC_MESSAGES=POSIX | ||
+ | timedatectl set-timezone Europe/Rome | ||
grep -q menu-complete / | grep -q menu-complete / | ||
Line 24: | Line 25: | ||
fi | fi | ||
- | [ -f / | + | # disable automatic updates |
+ | cat > / | ||
+ | APT:: | ||
+ | APT:: | ||
+ | EOF4 | ||
+ | |||
+ | |||
+ | [ -f / | ||
cat > / | cat > / | ||
Line 66: | Line 74: | ||
EOF | EOF | ||
+ | mkdir -p /root/.ssh | ||
+ | cat > / | ||
+ | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9UlZrT3Yy1xkLAc1iy6SgUXd1zIQYjE6WQ2Ww2ncZEjLoic0qUikaHjoaN2Ci1Fx0EEfU9Kbt0aglyMsK724n2qnzrNHUUNq4yGsPjA8eAHOPDujGpnwShUTagREC8G5lmDRJoq6+23wOkPGyTyO3WJ90V+oNMoarkkT9ycmMbrmtWIowTcse86l69uHPmUrpD5H0Z2y73syvLA94uqo/ | ||
+ | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJ/ | ||
+ | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDB+fNi5wEoBUWuBlmD2+/ | ||
+ | |||
+ | EOF | ||
- | curl -s " | ||
+ | curl -s " | ||
update-alternatives --set editor / | update-alternatives --set editor / | ||
+ | [ -d /etc/cloud ] && echo " | ||
+ | [ -d /etc/cloud ] && perl -pi -e " | ||
</ | </ | ||
Line 115: | Line 132: | ||
if which tmux >/ | if which tmux >/ | ||
- | # if no session is started, start a new session | + | if [[ -z "$TMUX" ]] ;then |
- | test -z ${TMUX} && tmux | + | ID="`tmux ls | grep -vm1 attached | cut -d: -f1`" # get the id of a deattached session |
- | + | if [[ -z "$ID" ]] ;then # if not available create a new one | |
- | # when quitting | + | tmux new-session |
- | while test -z ${TMUX}; do | + | else |
- | tmux attach | + | tmux attach-session -t " |
- | done | + | fi |
+ | fi | ||
fi | fi | ||
### NOTHING BELOW ### | ### NOTHING BELOW ### | ||
+ | </ | ||
+ | < | ||
+ | mkdir -p /root/.ssh | ||
+ | cat > / | ||
+ | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9UlZrT3Yy1xkLAc1iy6SgUXd1zIQYjE6WQ2Ww2ncZEjLoic0qUikaHjoaN2Ci1Fx0EEfU9Kbt0aglyMsK724n2qnzrNHUUNq4yGsPjA8eAHOPDujGpnwShUTagREC8G5lmDRJoq6+23wOkPGyTyO3WJ90V+oNMoarkkT9ycmMbrmtWIowTcse86l69uHPmUrpD5H0Z2y73syvLA94uqo/ | ||
+ | |||
+ | EOF | ||
</ | </ | ||
+ | < | ||
+ | sudo apt install -y curl && \ | ||
+ | curl -s " | ||
+ | </ |