fix loading of sshd or teleport and get teleport output into console
This commit is contained in:
@@ -154,14 +154,6 @@ function create_folder_and_change_permissions {
|
|||||||
chown -R "$USER":"$USER" "$1"
|
chown -R "$USER":"$USER" "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
function run_teleport_server() {
|
|
||||||
if [ -f "/etc/teleport.yaml" ]; then
|
|
||||||
echo "* STARTING Teleport Server"
|
|
||||||
teleport start -c /etc/teleport.yaml > /var/log/teleport.log 2>&1 &
|
|
||||||
sepurator
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function run_prometheus_exporter() {
|
function run_prometheus_exporter() {
|
||||||
if [ "$RUN_PROMETHEUS_EXPORTER" != "false" ]; then
|
if [ "$RUN_PROMETHEUS_EXPORTER" != "false" ]; then
|
||||||
create_folder_and_change_permissions "/var/log/"
|
create_folder_and_change_permissions "/var/log/"
|
||||||
@@ -186,6 +178,15 @@ function run_prometheus_exporter() {
|
|||||||
sepurator
|
sepurator
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function run_correct_ssh_service() {
|
||||||
|
if [ -f "/etc/teleport.yaml" ]; then
|
||||||
|
echo "* STARTING Teleport Server"
|
||||||
|
exec teleport start -c /etc/teleport.yaml 2>&1
|
||||||
|
else
|
||||||
|
exec /usr/sbin/sshd -D -e "$@" 2>&1
|
||||||
|
fi;
|
||||||
|
}
|
||||||
#####################################################################################################
|
#####################################################################################################
|
||||||
# Main Code
|
# Main Code
|
||||||
#####################################################################################################
|
#####################################################################################################
|
||||||
@@ -202,11 +203,10 @@ sepurator
|
|||||||
|
|
||||||
maintenance_enable
|
maintenance_enable
|
||||||
show_timezone_output
|
show_timezone_output
|
||||||
run_teleport_server
|
|
||||||
run_prometheus_exporter
|
run_prometheus_exporter
|
||||||
run_install_script
|
run_install_script
|
||||||
|
|
||||||
echo "* Init done! - Starting SSH-Daemon..."
|
echo "* Init done! - Starting SSH-Daemon..."
|
||||||
sepurator
|
sepurator
|
||||||
|
|
||||||
exec /usr/sbin/sshd -D -e "$@" #2> /var/log/sshd.log
|
run_correct_ssh_service
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
DOCKER_IMAGE_VERSION="2.0.0"
|
DOCKER_IMAGE_VERSION="3.0.0"
|
||||||
BORG_VERSION=$(borg -V)
|
BORG_VERSION=$(borg -V)
|
||||||
SSH_FOLDERS=( "/sshkeys/clients" "/sshkeys/host" )
|
SSH_FOLDERS=( "/sshkeys/clients" "/sshkeys/host" )
|
||||||
NODE_EXPORTER_DIR="/var/log"
|
NODE_EXPORTER_DIR="/var/log"
|
||||||
|
|||||||
Reference in New Issue
Block a user