Skip to content

Commit

Permalink
Merge pull request #11 from chrisjudk/testing
Browse files Browse the repository at this point in the history
Changes on testing ready for competition
  • Loading branch information
chrisjudk committed Jan 19, 2018
2 parents 48ef893 + 063b899 commit dcf8625
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Ubuntu.conf
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ MEDIA_LOCATIONS=true
#log all root cronjobs
LOG_CRON=true

#Log all running processes
PS_LOG=true

#run netstat command and log the output
LOG_NETSTAT=true

Expand Down
9 changes: 7 additions & 2 deletions Ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if [ -r Ubuntu.conf ]; then
# Upgrade all installed packages
if [ "$UPGRADES" = true ]; then
echo "installing updates"
apt-get upgrade -y
apt-get dist-upgrade -y
fi

# Clean up unnecessary junk
Expand All @@ -55,6 +55,7 @@ if [ -r Ubuntu.conf ]; then
echo -n "" > /var/local/ASAO.log
echo -n "" > /var/local/mediafiles.log
echo -n "" > /var/local/cronjoblist.log
echo -n "" > /var/local/pslist.log

# Add additional instructions to log file
echo "adding instructions to log file"
Expand Down Expand Up @@ -135,7 +136,11 @@ if [ -r Ubuntu.conf ]; then
echo "Outputting cronjobs to /var/local/cronjoblist.log"
crontab -l >> /var/local/cronjoblist.log
fi

# List all processes & output to /var/local/pslist.log
if [ "$PS_LOG" = true ]; then
echo "Outputting processes to /var/local/pslist.log"
ps axk start_time -o start_time,pid,user,cmd >> /var/local/pslist.log
fi
# List all connections, open or listening
if [ "$LOG_NETSTAT" = true ]; then
echo "finding open connections and outputting to /var/local/netstat.log"
Expand Down

0 comments on commit dcf8625

Please sign in to comment.