forked from MiSTer-devel/Scripts_MiSTer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake_linux_nice.sh
More file actions
24 lines (17 loc) · 935 Bytes
/
make_linux_nice.sh
File metadata and controls
24 lines (17 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
set -e
echo "Making Linux nice..."
this_dir="$(cd "$(dirname "$0")" && pwd -P)"
echo " - Modifying root user settings..."
cp -f "$this_dir/nice-linux/.bashrc" /root/
cp -f "$this_dir/nice-linux/.bash_aliases" /root/
cp -f "$this_dir/nice-linux/.bash_logout" /root/
cp -f "$this_dir/nice-linux/.bash_prompt" /root/
cp -f "$this_dir/nice-linux/.profile" /root/
cp -f "$this_dir/nice-linux/.vimrc" /root/
cp -rf "$this_dir/nice-linux/.ssh" /root/
echo " - Configuring ssh KeepAlive settings..."
sed -i -E 's|^#[[:blank:]]*ClientAliveInterval[[:blank:]]*.*$|ClientAliveInterval 60|g; s|^#[[:blank:]]*ClientAliveCountMax[[:blank:]]*.*$|ClientAliveCountMax 10|g' /etc/ssh/sshd_config
echo " - Configuring Bluetooth timeouts..."
sed -i -E 's|^(DiscoverableTimeout = ).*%|\10|g; s|^(PairableTimeout = ).*$|\10|g; s|^(AutoConnectTimeout = ).*$|\160|g; s|^(FastConnectable = ).*$|\1true|g' /etc/bluetooth/main.conf
echo "Done."