csmit195

spawnerChild:update

Sep 19th, 2018
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local directory = 'spawnerserver'
  2. local programName = 'code'
  3.  
  4. -- Delete Everything
  5. print('Uninstalling existing applications, ignore the error')
  6. shell.run('rm /*')
  7.  
  8. -- Setup Directories
  9. print('Creating software directories')
  10. shell.run('mkdir /'..directory)
  11.  
  12. -- Install Scripts
  13. print('Downloading and Installing Software')
  14. shell.run('pastebin get 3ageECYg /'..directory..'/'..programName)
  15.  
  16. -- Create Update File
  17. print('Creating update command')
  18. local startupFile = fs.open('/update', 'w')
  19. startupFile.write('shell.run(\'pastebin run 17gTfQqv\')')
  20. startupFile.close()
  21.  
  22. -- Create Startup File
  23. print('Configuring device startup')
  24. local startupFile = fs.open('/startup', 'w')
  25. startupFile.write('shell.run(\''..directory..'/'..programName..'\')')
  26. startupFile.close()
  27.  
  28. print('Installation Complete, restarting device')
  29. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment