diff --git a/Ubuntu.conf b/Ubuntu.conf index 4814519..2c2a490 100644 --- a/Ubuntu.conf +++ b/Ubuntu.conf @@ -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 diff --git a/Ubuntu.sh b/Ubuntu.sh index e4a2d0f..c061ab8 100644 --- a/Ubuntu.sh +++ b/Ubuntu.sh @@ -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 @@ -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" @@ -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"