.
This commit is contained in:
@ -1,16 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
export FRAMEWORK_INCLUDES_FULL_PATH
|
echo $ProjectRootPath
|
||||||
FRAMEWORK_INCLUDES_FULL_PATH="$(realpath ../Framework-Includes)"
|
|
||||||
|
|
||||||
export FRAMEWORK_CONFIGS_FULL_PATH
|
|
||||||
FRAMEWORK_CONFIGS_FULL_PATH="$(realpath ../Framework-ConfigFiles)"
|
|
||||||
|
|
||||||
export PROJECT_INCLUDES_FULL_PATH
|
|
||||||
PROJECT_INCLUDES_FULL_PATH="$(realpath ../Project-Includes)"
|
|
||||||
|
|
||||||
export PROJECT_CONGIGS_FULL_PATH
|
|
||||||
PROJECT_INCLUDES_FULL_PATH="$(realpath ../Project-ConfigFiles)"
|
|
||||||
|
|
||||||
|
|
||||||
#Framework variables are read from hee
|
#Framework variables are read from hee
|
||||||
@ -33,7 +23,42 @@ for file in ${ProjectIncludeFiles[@]}; do
|
|||||||
done
|
done
|
||||||
unset IFS
|
unset IFS
|
||||||
|
|
||||||
echo $PWD
|
export ROOT_SSH_DIR
|
||||||
|
ROOT_SSH_DIR="/root/.ssh"
|
||||||
|
|
||||||
|
export LOCALUSER_SSH_DIR
|
||||||
|
LOCALUSER_SSH_DIR="/home/localuser/.ssh"
|
||||||
|
|
||||||
|
export SUBODEV_SSH_DIR
|
||||||
|
SUBODEV_SSH_DIR="/home/subodev/.ssh"
|
||||||
|
|
||||||
|
if [ ! -d $ROOT_SSH_DIR ]; then
|
||||||
|
mkdir /root/.ssh/
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl --silent ${DL_ROOT}/ProjectCode/ConfigFiles/SSH/AuthorizedKeys/root-ssh-authorized-keys > /root/.ssh/authorized_keys
|
||||||
|
chmod 400 /root/.ssh/authorized_keys
|
||||||
|
chown root: /root/.ssh/authorized_keys
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$LOCALUSER_CHECK" -gt 0 ]; then
|
||||||
|
if [ ! -d $LOCALUSER_SSH_DIR ]; then
|
||||||
|
mkdir -p /home/localuser/.ssh/
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl --silent ${DL_ROOT}/ProjectCode/ConfigFiles/SSH/AuthorizedKeys/localuser-ssh-authorized-keys > /home/localuser/.ssh/authorized_keys \
|
||||||
|
&& chown localuser /home/localuser/.ssh/authorized_keys \
|
||||||
|
&& chmod 400 /home/localuser/.ssh/authorized_keys
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$SUBODEV_CHECK" = 1 ]; then
|
||||||
|
if [ ! -d $SUBODEV_SSH_DIR ]; then
|
||||||
|
mkdir /home/subodev/.ssh/
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl --silent ${DL_ROOT}/ProjectCode/ConfigFiles/SSH/AuthorizedKeys/localuser-ssh-authorized-keys > /home/subodev/.ssh/authorized_keys \
|
||||||
|
&& chmod 400 /home/subodev/.ssh/authorized_keys \
|
||||||
|
&& chown subodev: /home/subodev/.ssh/authorized_keys
|
||||||
|
|
||||||
cat ../../ConfigFiles/SSH/Configs/tsys-sshd-config > /etc/ssh/sshd_config
|
cat ../../ConfigFiles/SSH/Configs/tsys-sshd-config > /etc/ssh/sshd_config
|
||||||
cat ../../ConfigFiles/SSH/Configs/ssh-audit-hardening.conf > /etc/ssh/sshd_config.d/ssh-audit_hardening.conf
|
cat ../../ConfigFiles/SSH/Configs/ssh-audit-hardening.conf > /etc/ssh/sshd_config.d/ssh-audit_hardening.conf
|
||||||
|
@ -86,42 +86,6 @@ curl --silent ${DL_ROOT}/ProjectCode/ConfigFiles/ZSH/tsys-zshrc > /etc/zshrc
|
|||||||
curl --silent ${DL_ROOT}/ProjectCode/ConfigFiles/SMTP/aliases > /etc/aliases
|
curl --silent ${DL_ROOT}/ProjectCode/ConfigFiles/SMTP/aliases > /etc/aliases
|
||||||
curl --silent ${DL_ROOT}/ProjectCode/ConfigFiles/Syslog/rsyslog.conf > /etc/rsyslog.conf
|
curl --silent ${DL_ROOT}/ProjectCode/ConfigFiles/Syslog/rsyslog.conf > /etc/rsyslog.conf
|
||||||
|
|
||||||
export ROOT_SSH_DIR
|
|
||||||
ROOT_SSH_DIR="/root/.ssh"
|
|
||||||
|
|
||||||
export LOCALUSER_SSH_DIR
|
|
||||||
LOCALUSER_SSH_DIR="/home/localuser/.ssh"
|
|
||||||
|
|
||||||
export SUBODEV_SSH_DIR
|
|
||||||
SUBODEV_SSH_DIR="/home/subodev/.ssh"
|
|
||||||
|
|
||||||
if [ ! -d $ROOT_SSH_DIR ]; then
|
|
||||||
mkdir /root/.ssh/
|
|
||||||
fi
|
|
||||||
|
|
||||||
curl --silent ${DL_ROOT}/ProjectCode/ConfigFiles/SSH/AuthorizedKeys/root-ssh-authorized-keys > /root/.ssh/authorized_keys
|
|
||||||
chmod 400 /root/.ssh/authorized_keys
|
|
||||||
chown root: /root/.ssh/authorized_keys
|
|
||||||
|
|
||||||
|
|
||||||
if [ "$LOCALUSER_CHECK" -gt 0 ]; then
|
|
||||||
if [ ! -d $LOCALUSER_SSH_DIR ]; then
|
|
||||||
mkdir -p /home/localuser/.ssh/
|
|
||||||
fi
|
|
||||||
|
|
||||||
curl --silent ${DL_ROOT}/ProjectCode/ConfigFiles/SSH/AuthorizedKeys/localuser-ssh-authorized-keys > /home/localuser/.ssh/authorized_keys \
|
|
||||||
&& chown localuser /home/localuser/.ssh/authorized_keys \
|
|
||||||
&& chmod 400 /home/localuser/.ssh/authorized_keys
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$SUBODEV_CHECK" = 1 ]; then
|
|
||||||
if [ ! -d $SUBODEV_SSH_DIR ]; then
|
|
||||||
mkdir /home/subodev/.ssh/
|
|
||||||
fi
|
|
||||||
|
|
||||||
curl --silent ${DL_ROOT}/ProjectCode/ConfigFiles/SSH/AuthorizedKeys/localuser-ssh-authorized-keys > /home/subodev/.ssh/authorized_keys \
|
|
||||||
&& chmod 400 /home/subodev/.ssh/authorized_keys \
|
|
||||||
&& chown subodev: /home/subodev/.ssh/authorized_keys
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user