<commit_before>#!/bin/sh
#
# /jumper/sbin/jumper.sh - wrapper script to setup user, start SSHD and SyslogD
# by: "<NAME>" <<EMAIL>>
#
exec >> /jumper/log/jumper.log 2>&1
date
oops(){ echo "`date` `hostname` Missing variable $1, check the Dockerfile" | tee -a /jumper/log/syslog ; exit 1; }
test -n "$PERSON" || oops 'PERSON'
test -n "$PUBSSHKEY" || oops 'PUBSSHKEY'
test -n "$PORT" || oops 'PORT'
sed -i "s/__PERSON__:/$PERSON:/" /etc/passwd
sed -i "s/__PERSON__:/$PERSON:/" /etc/shadow
echo "${PUBSSHKEY}" > /jumper/doc/AuthorizedKeysFile
#
/usr/sbin/sshd -p $PORT -f /jumper/cfg/sshd_config
#
#
#
## SyslogD (choose only one)
# /sbin/syslogd -n -O /dev/console             # For use with `docker run --tty ...`
/sbin/syslogd -n -O /jumper/log/syslog         # Log to file, use with `docker run --detach ...`
# /sbin/syslogd -n -R loghost.company.edu:514  # Log to loghost like Splunk or ELK stack.
<commit_msg>Sun Mar 26 13:58:53 UTC 2017<commit_after>#!/bin/sh
#
# /jumper/sbin/jumper.sh - wrapper script to setup user, start SSHD and SyslogD
# by: "<NAME>" <<EMAIL>>
#
exec >> /jumper/log/jumper.log 2>&1
date
oops(){ echo "`date` `hostname` Missing variable $1, check the Dockerfile"; sleep 10 ; exit 1; }
test -n "$PERSON" || oops 'PERSON'
test -n "$PUBSSHKEY" || oops 'PUBSSHKEY'
test -n "$PORT" || oops 'PORT'
sed -i "s/__PERSON__:/$PERSON:/" /etc/passwd
sed -i "s/__PERSON__:/$PERSON:/" /etc/shadow
echo "${PUBSSHKEY}" > /jumper/doc/AuthorizedKeysFile
#
/usr/sbin/sshd -p $PORT -f /jumper/cfg/sshd_config
#
#
#
## SyslogD (choose only one)
# /sbin/syslogd -n -O /dev/console             # For use with `docker run --tty ...`
/sbin/syslogd -n -O /jumper/log/syslog         # Log to file, use with `docker run --detach ...`
# /sbin/syslogd -n -R loghost.company.edu:514  # Log to loghost like Splunk or ELK stack.

{'fraction_non_alphanumeric': 0.1812191103789127, 'fraction_numerical': 0.015376166941241077, 'mean_word_length': 3.1598173515981736, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2459401', 'n_tokens_mistral': 781, 'n_tokens_neox': 735, 'n_words': 208}