summaryrefslogtreecommitdiff
path: root/qmenu/qmenu_vm/fqvm_service
diff options
context:
space:
mode:
authorCasper <me@skylarcloud.xyz>2024-12-23 17:13:45 -0700
committerCasper <me@skylarcloud.xyz>2024-12-23 17:13:45 -0700
commit01a33ab0913d439150065ac23644c4f140ff8917 (patch)
tree9ad71bd7e6f5a5aad2c2cdbff4bb75de12565998 /qmenu/qmenu_vm/fqvm_service
parent7b5a0e9e88f015cb68a46bb657661f4663e287af (diff)
added qmenu!
Diffstat (limited to 'qmenu/qmenu_vm/fqvm_service')
-rw-r--r--qmenu/qmenu_vm/fqvm_service39
1 files changed, 39 insertions, 0 deletions
diff --git a/qmenu/qmenu_vm/fqvm_service b/qmenu/qmenu_vm/fqvm_service
new file mode 100644
index 0000000..cc8baaa
--- /dev/null
+++ b/qmenu/qmenu_vm/fqvm_service
@@ -0,0 +1,39 @@
+services=1
+
+while [ -n "$services" ]; do
+
+ services=$(qvm-service "$qube" --list | dmenu-unlinked -l 32 -p "$qube:" | cut -f1 -d\ )
+
+ if [ -n "$services" ]; then
+
+ for service in $services; do
+
+ qvm-service "$qube" --list | grep -q "^$service " &&
+
+ unset='\nUnset'
+
+ value=$(printf "Disable\nEnable$unset" | dmenu-unlinked -l 3 -i -p "Select value for '$service':")
+
+ if [ "$value" = Disable ]; then
+
+ qvm-service "$qube" "$service" off ||
+
+ echo Go back... | dmenu-unlinked -p "Error: Failed to deactivate '$service'!" > /dev/null 2>&1
+
+ elif [ "$value" = Enable ]; then
+
+ qvm-service "$qube" "$service" on ||
+
+ echo Go back... | dmenu-unlinked -p "Error: Failed to activate '$service'!" > /dev/null 2>&1
+
+ elif [ "$value" = Unset ]; then
+
+ qvm-service "$qube" "$service" --unset ||
+
+ echo Go back... | dmenu-unlinked -p "Error: Failed to unset '$service'!" > /dev/null 2>&1
+ fi
+
+ [ -n "$unset" ] && unset unset
+ done
+ fi
+done