Video
About
Occasionally, the CasaOS container settings UI may not grant us the flexibility to modify configurations as we desire. To address this challenge, we’ve developed a script that simplifies the process:
bash -c "$(wget -qLO - https://raw.githubusercontent.com/bigbeartechworld/big-bear-scripts/master/edit-casaos-apps/run.sh)"
This script allows you to choose your desired application and select your preferred text editor, currently supporting Nano and Vim.
How does it work
- It’s a Bash script designed for execution in your terminal.
- The script is fetched and executed in a single command using
wgetandbash. - Here’s a breakdown of the command:
bash -c: This instructs your shell to execute the subsequent command.wget -qLO -: This part of the command employswgetto download a script from the specified URL.-q: Quiet mode, reducingwget’s output.-O -: This option tellswgetto write the downloaded content to the standard output (the terminal) instead of saving it to a file.
https://raw.githubusercontent.com/bigbeartechworld/big-bear-scripts/master/edit-casaos-apps/run.sh: The URL points to the script you want to download and execute.
- Once the script is fetched and executed, it provides a menu that allows you to choose a specific CasaOS application for configuration.
- After selecting the application, the script prompts you to pick a text editor from the available options, which are currently nano and vim.
- Once you’ve made your selections, the script opens the configuration file for the chosen CasaOS application using the selected text editor, enabling you to make the desired changes.
- After you’ve made the necessary changes and saved them in the text editor, the script reloads the CasaOS application in the background, to apply the configuration changes you made.
Edit and Save changes
For Vim:
- Insert/Edit Text: Press
ito enter insert mode. You can now edit or insert text as needed. - Save Changes:
- Press
Escto exit insert mode. - To save changes, type
:wand pressEnter. This command writes (saves) the changes to the file.
- Exit Vim:
- To exit Vim after saving, type
:qand pressEnter. This command quits Vim. - If you’ve made changes and haven’t saved, you can use
:q!to forcefully exit without saving. - To save and exit in one command, you can use
:wqand pressEnter.
For Nano:
- Insert/Edit Text: You can start editing the text immediately in Nano.
- Save Changes:
- To save changes, press
Ctrl+O(holdCtrland pressO). Nano will prompt you to confirm the file name; pressEnterto save. - You can keep the same file name or change it if needed.
- Exit Nano:
- To exit Nano, press
Ctrl+X(holdCtrland pressX). If you’ve made changes, Nano will prompt you to save them; pressYto confirm andEnterto save.