summaryrefslogtreecommitdiff
path: root/src/shell.c
diff options
context:
space:
mode:
authorkx <kx@radix.pro>2022-09-28 19:18:07 +0300
committerkx <kx@radix.pro>2022-09-28 19:18:07 +0300
commit13ea0c85cfe0c7b9880d5ddf2abe6409cedf9f22 (patch)
tree7f16c61750ef4e79866c1e89394cd925f62cc873 /src/shell.c
parente395700cd3900e8d91a6e2bbc09f5e9b24437d30 (diff)
downloadsila-shell-13ea0c85cfe0c7b9880d5ddf2abe6409cedf9f22.tar.xz
Poweroff command for admin user
Diffstat (limited to 'src/shell.c')
-rw-r--r--src/shell.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/shell.c b/src/shell.c
index ade4d53..c5b8332 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -150,3 +150,12 @@ int com_ping( char *arg )
sprintf( syscom, "ping %s", arg );
return( system( syscom ) );
}
+
+int com_poweroff( char *arg )
+{
+ if( !arg )
+ arg = "";
+
+ sprintf( syscom, "poweroff %s", arg );
+ return( system( syscom ) );
+}