From 5373bcf569ac21f7e04428124048ec003be5aebd Mon Sep 17 00:00:00 2001 From: CyberL1 Date: Sat, 30 Nov 2024 15:26:48 +0100 Subject: [PATCH] feat: state management commands --- dlinux | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dlinux b/dlinux index 66ed049..fb17195 100755 --- a/dlinux +++ b/dlinux @@ -13,6 +13,9 @@ print_help() { printf " $0 hello - Get a hello message $0 name - Get your SSHID +$0 start - Start your container +$0 stop - Stop your container +$0 restart - Restart your container $0 info - Get info about your container $0 stats - Get your container memory usage statistics $0 time - Get your container expiration time @@ -36,6 +39,18 @@ command_name() { call_api GET name | jq -r .message } +command_start() { + call_api GET start | jq -r .message +} + +command_stop() { + call_api GET stop | jq -r .message +} + +command_restart() { + call_api GET restart | jq -r .message +} + command_info() { data=$(call_api GET info)