Comments (2)
Many thanks for your suggestion.
Generally I like the idea of custom scenes, especially since this implies some generic way of defining and loading scenes. This however means also some infrastructural rework of the script, to combine all functions and variables which belong to a script in a way which allows to add more, likely an array. Ah, basically what you say already. Whether the array(s) are then extended with a single file, or multiple files within a directory, should not matter much. The latter would allow easier extension. But please do not use the dietpi
user's home dir, as this user will go eventually. Instead I suggest /var/lib/dietpi/cloudshell/scenes/
and/or even something on user basis, like ~/.config/dietpi-cloudshell/scenes
.
But while this would be awesome, if a DietPi-VPN/OpenVPN scene is wanted short-/midterm, a hardcoded additional scene is much easier to implement. A DietPi-VPN scene would be a logical extension, as we have an optional login banner entry for it as well, and some status function in the dietpi-vpn
script. This could be extended to return some more information for the multiple available lines in a cloudshell scene: https://github.com/MichaIng/DietPi/blob/a27f012/dietpi/func/dietpi-banner#L248
from dietpi.
Exactly, you get the idea!
An openvpn script could also be mader after a split-up of the cloudshell in separate scene files. Let's save us that small part ;)
I think when splitting up the cloudshell, so it would be easier to implement new scenes, will give Cloudshell a serious boost. People will probable add scenes for specific daemons or network-bridging, etc.
If there is anything I could do, let me know. You probably have a better idea on this, how to separate scenes from the (1 file): https://github.com/MichaIng/DietPi/blob/master/dietpi/dietpi-cloudshell
- Probably, making the aEnabledScenes[] a variable which is loaded from the settings file?
- Create a new array which maps scene_numbers to scene_function_names, e.g: customScenes[11]="myFunction".
- During the loop of aEnabledScenes, check if there are more than 10 scenes. if so, load the functions files (.sh) from /etc/dietpi/cloudshell/scenes/ (function files as in the customScenes array).
- Call the function, loaded from the file, by it's name as in the customeScenes array.
In this way, we first make an extension to cloudShell. So we do not put existing scenes in scene files. This way it's more seamless to migrate to the new version we create.
from dietpi.
Related Issues (20)
- nfs problem when trying to HOT 2
- PiVPN with Wireguard add keep alive HOT 7
- Open Beta v8.25 | Please help testing and hardening our upcoming release HOT 1
- concurrent execution of dietpi-backup after lost ssh connection HOT 6
- please update tasmoadmin HOT 14
- DietPi-Backup Error after update to 8.25 HOT 2
- Very first run from a fresh install gives error "HTTP/2 stream 1 was not closed cleanly before end of the underlying stream" while doing the DietPi-Update". HOT 7
- Iteration v9.0 (2024-01-20)
- DietPi-Installer | Prevent empty /etc/resolv.conf on NetMan uninstall HOT 9
- Migration script causes failure to load device overlays on RPi 4B HOT 5
- Raspberry Pi 5 - Backup failed after migration from Pi 4 HOT 4
- Migration script Pi4 - umount: /boot: target is busy. HOT 7
- RPi 4 fails to upgrade packages HOT 5
- FAILED first run, Rockport QuartzA board, flashed latest dietpi image to 128G eMMC card, powered on HOT 1
- Installing Docker and Portainer fails HOT 4
- Raspberry Pi | libc-bin segmentation fault when using USB-SD adapter HOT 29
- DietPi-Software | Uninstall / Install / Update HOT 3
- Rock 3C HOT 2
- Image | Orange Pi Zero 2W HOT 91
- Kodi fails to start HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dietpi.