mirror of
https://github.com/rclone/rclone.git
synced 2024-12-01 12:55:19 +01:00
23 lines
411 B
Bash
23 lines
411 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
stop() {
|
||
|
if status ; then
|
||
|
docker stop $NAME
|
||
|
echo "$NAME stopped"
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
status() {
|
||
|
if docker ps --format "{{.Names}}" | grep ^${NAME}$ >/dev/null ; then
|
||
|
echo "$NAME running"
|
||
|
else
|
||
|
echo "$NAME not running"
|
||
|
return 1
|
||
|
fi
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
docker_ip() {
|
||
|
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $NAME
|
||
|
}
|