indentation

This commit is contained in:
tteckster 2023-03-22 14:59:10 -04:00 committed by GitHub
parent 602d4496f8
commit 38381bb6ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 54 additions and 36 deletions

View File

@ -16,9 +16,15 @@ color() {
} }
verb_ip6() { verb_ip6() {
if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi if [ "$VERBOSE" = "yes" ]; then
set -x
STD=""
else STD="silent"; fi
silent() { "$@" >/dev/null 2>&1; } silent() { "$@" >/dev/null 2>&1; }
if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi if [ "$DISABLEIPV6" == "yes" ]; then
echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf
$STD sysctl -p
fi
} }
catch_errors() { catch_errors() {
@ -103,5 +109,8 @@ update_os() {
motd_ssh() { motd_ssh() {
echo "export TERM='xterm-256color'" >>/root/.bashrc echo "export TERM='xterm-256color'" >>/root/.bashrc
echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" >/etc/motd echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" >/etc/motd
if [[ "${SSH_ROOT}" == "yes" ]]; then $STD rc-update add sshd; $STD /etc/init.d/sshd start; fi if [[ "${SSH_ROOT}" == "yes" ]]; then
$STD rc-update add sshd
$STD /etc/init.d/sshd start
fi
} }

View File

@ -15,9 +15,15 @@ color() {
} }
verb_ip6() { verb_ip6() {
if [ "$VERBOSE" = "yes" ]; then set -x; STD=""; else STD="silent"; fi if [ "$VERBOSE" = "yes" ]; then
set -x
STD=""
else STD="silent"; fi
silent() { "$@" >/dev/null 2>&1; } silent() { "$@" >/dev/null 2>&1; }
if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf; $STD sysctl -p; fi if [ "$DISABLEIPV6" == "yes" ]; then
echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf
$STD sysctl -p
fi
} }
catch_errors() { catch_errors() {
@ -100,7 +106,10 @@ motd_ssh() {
echo "export TERM='xterm-256color'" >>/root/.bashrc echo "export TERM='xterm-256color'" >>/root/.bashrc
echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" >/etc/motd echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" >/etc/motd
chmod -x /etc/update-motd.d/* chmod -x /etc/update-motd.d/*
if [[ "${SSH_ROOT}" == "yes" ]]; then sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; systemctl restart sshd; fi if [[ "${SSH_ROOT}" == "yes" ]]; then
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
} }
customize() { customize() {