Advertisement
DOGGYWOOF

Doggy OS firt time setup

Jan 29th, 2024
13
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. -- Doggy OS First Time Setup
  2.  
  3. -- Function to create a directory and write a password to a file
  4. function setupAdministrator()
  5. print("Welcome to Doggy OS First Time Setup")
  6.  
  7. -- Ask for a password
  8. write("Enter the password for the administrator: ")
  9. local password = read("*")
  10.  
  11. -- Create the directory
  12. fs.makeDir("/disk/user/administrator")
  13.  
  14. -- Create and write the password to password.txt
  15. local file = fs.open("/disk/user/administrator/password.txt", "w")
  16. file.write(password)
  17. file.close()
  18.  
  19. print("Setup complete. Doggy OS is ready for use.")
  20. end
  21.  
  22. -- Load the GUI
  23. function loadGUI()
  24. shell.run("/disk/os/gui")
  25. end
  26.  
  27. -- Main program
  28. if not fs.exists("/disk/user/administrator") then
  29. setupAdministrator()
  30. end
  31.  
  32. loadGUI()
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement