csmit195

install

Sep 29th, 2018
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.94 KB | None | 0 0
  1. local directory = 'masterserver'
  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. shell.run('mkdir/'..directory..'/Views')
  12.  
  13. -- Install Scripts
  14. print('Downloading and Installing Software')
  15. shell.run('pastebin get 9JqzWdnw /'..directory..'/'..programName)
  16. shell.run('pastebin get KUUpAucF /'..directory..'/Views/main.view')
  17.  
  18. -- Create Update File
  19. print('Creating update command')
  20. local startupFile = fs.open('/update', 'w')
  21. startupFile.write('shell.run(\'pastebin run CEQMZ8UV\')')
  22. startupFile.close()
  23.  
  24. -- Create Startup File
  25. print('Configuring device startup')
  26. local startupFile = fs.open('/startup', 'w')
  27. startupFile.write('shell.run(\''..directory..'/'..programName..'\')')
  28. startupFile.close()
  29.  
  30. print('Installation Complete, restarting device')
  31. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment