#!/usr/bin/python
# This script automates the update/upgrade commands and autoremoves unneeded files

import subprocess
import os

# check if user is root, if not, get root access WIP

# Get update and wait until update has finished downloading
update = subprocess.Popen(['apt-get', 'update'])
update.wait()

# Run the downloaded update
upgrade = subprocess.Popen(['apt-get', 'upgrade', '-y'])
upgrade.wait()

# autoremove packages
remove = subprocess.Popen(['apt-get', 'autoremove', '-y'])
remove.wait()
os.system('echo success')
532fba57ca40b53ddf78a609e3a732be5fd5b786
<mask token>

<mask token>
update.wait()
<mask token>
upgrade.wait()
<mask token>
remove.wait()
os.system('echo success')

<mask token>
update = subprocess.Popen(['apt-get', 'update'])
update.wait()
upgrade = subprocess.Popen(['apt-get', 'upgrade', '-y'])
upgrade.wait()
remove = subprocess.Popen(['apt-get', 'autoremove', '-y'])
remove.wait()
os.system('echo success')

import subprocess
import os
update = subprocess.Popen(['apt-get', 'update'])
update.wait()
upgrade = subprocess.Popen(['apt-get', 'upgrade', '-y'])
upgrade.wait()
remove = subprocess.Popen(['apt-get', 'autoremove', '-y'])
remove.wait()
os.system('echo success')

#!/usr/bin/python
# This script automates the update/upgrade commands and autoremoves unneeded files

import subprocess
import os

# check if user is root, if not, get root access WIP

# Get update and wait until update has finished downloading
update = subprocess.Popen(['apt-get', 'update'])
update.wait()

# Run the downloaded update
upgrade = subprocess.Popen(['apt-get', 'upgrade', '-y'])
upgrade.wait()

# autoremove packages
remove = subprocess.Popen(['apt-get', 'autoremove', '-y'])
remove.wait()
os.system('echo success')