脚本打印出执行用户

This commit is contained in:
洛洛希雅Lolosia 2024-04-26 00:33:16 +08:00
parent d6554998ec
commit 09516544a9

View File

@ -1,7 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
declare name='lolosia-backend' declare name='lolosia-backend'
declare user=$(users)
echo "当前用户为:${user}"
echo '停止容器:' ${name} echo '停止容器:' ${name}
docker stop ${name} docker stop ${name}