Restore Default File/Folder Structure
This script will restore Bash startup files, reinstall the Nginx webserver, and restore other mandatory files and directories for your Ultra service to the default structure. It will not overwrite any media files or application configuration files, except for any webserver files you have edited in ~/.apps/nginx
.
The script is to be used if you have accidentally deleted the default files and directories required for your service to run.
Listed below are all the files and directories that will be restored.
~/.bashrc
~/.profile
~/bin
~/downloads
~/media
~/www
Additionally, a symbolic link will be created between ~/downloads
and ~/www
Usage
- Connect to your Ultra service via SSH.
- Once connected, execute the following command:
bash <(wget -qO- https://scripts.ultra.cc/util-v2/Ultra-Restore/main.sh)
- Once you have executed the command, you should see the following terminal output:
[LIST] Operations list that will be performed:
[1.] Restore default shell configuration files - '/home/username/.bashrc' and '/home/username/.profile'
[2.] Recreate default directories - '/home/username/bin', '/home/username/downloads', '/home/username/media' and '/home/username/www'
[3.] Recreate symlink of '/home/side/downloads' in '/home/side/www'
[4.] Reinstall Webserver (Nginx).
[WARNING] Please read the above list of operations carefully before proceeding with the script further.
[LIST] Choose one of the following options:
1) Yes, proceed with listed operations.
2) No, termintate script.
[INPUT REQUIRED] Enter your option choice '[1-2]':
- To proceed with the restoration, press
1
and confirm withENTER
. - If you do not want to proceed, press
2
and confirm withENTER
. - Done!
If you require further assistance, you can open a support ticket here!
Feedback and suggestions regarding this article are welcome on our Discord server