mirror of
https://github.com/acedanger/shell.git
synced 2025-12-06 02:20:11 -08:00
added new server to logic
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
function run_io () {
|
function update_agent () {
|
||||||
docker run -d -p 9001:9001 --name=${image_name} --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes ${portainer_image}
|
docker run -d -p 9001:9001 --name=${image_name} --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes ${portainer_image}
|
||||||
}
|
}
|
||||||
|
|
||||||
function run_vperanda () {
|
function update () {
|
||||||
docker run -d -p 8000:8000 -p 9000:9000 -p 9443:9443 --name=${image_name} --restart=always --pull=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data ${portainer_image}
|
docker run -d -p 8000:8000 -p 9000:9000 -p 9443:9443 --name=${image_name} --restart=always --pull=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data ${portainer_image}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -20,6 +20,10 @@ case ${HOSTNAME} in
|
|||||||
portainer_image="portainer/agent:latest"
|
portainer_image="portainer/agent:latest"
|
||||||
image_name="portainer_agent"
|
image_name="portainer_agent"
|
||||||
;;
|
;;
|
||||||
|
svr-office)
|
||||||
|
portainer_image="portainer/agent:latest"
|
||||||
|
image_name="portainer_agent"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# stop and remove portainer
|
# stop and remove portainer
|
||||||
@@ -32,10 +36,13 @@ docker pull ${portainer_image}
|
|||||||
# run the command run the latest [portainer,portainer-agent] docker image
|
# run the command run the latest [portainer,portainer-agent] docker image
|
||||||
case ${HOSTNAME} in
|
case ${HOSTNAME} in
|
||||||
vperanda)
|
vperanda)
|
||||||
run_vperanda
|
update
|
||||||
;;
|
;;
|
||||||
io)
|
io)
|
||||||
run_io
|
update_agent
|
||||||
|
;;
|
||||||
|
svr-office)
|
||||||
|
update_agent
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user