Skip to content

Commit

Permalink
Merge pull request #36 from TiTidom-RC/dev
Browse files Browse the repository at this point in the history
Update Templates
  • Loading branch information
TiTidom-RC authored Sep 27, 2024
2 parents c85e6e0 + f15b3df commit 045c676
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions data/commands/commands.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"uptime": {
"name": "Uptime",
"short_description": "Uptime of the system",
"description": "Affiche l'uptime du système distant",
"command": "awk '{print $1}' /proc/uptime",
"type": "info",
"subtype": "numeric"
},
"list_services": {
"name": "List Running Services",
"short_description": "List Running Services",
Expand All @@ -8,16 +16,16 @@
"subtype": "string"
},
"nb_sys_updates": {
"name": "Sys Updates Number",
"name": "Nb Sys Updates",
"short_description": "Number of System Updates",
"description": "Retourne le nombre de mises à jour en attente sur le système distant",
"command": "sudo apt-get update -qq 2>/dev/null | cut -d'.' -f1",
"command": "sudo apt update -qq 2>/dev/null | grep -o '^[0-9]*' | awk 'BEGIN {ORS=\"\";} {print ($1 == \"\" ? 0 : $1)} END {if (NR == 0) print 0}'",
"type": "info",
"subtype": "string"
"subtype": "numeric"

},
"list_sys_updates": {
"name": "List System Updates",
"name": "List Sys Updates",
"short_description": "List Packages to update",
"description": "Retourne la liste des paquets systèmes en attente de mise à jour sur le système distant",
"command": "sudo apt-get -qq update 2>/dev/null && sudo apt list --upgradable -qq 2>/dev/null | cut -d'/' -f1 | awk 'BEGIN {RS=\"\"}{gsub(/\\n/,\",\",$0); print $0}'",
Expand Down

0 comments on commit 045c676

Please sign in to comment.