improve server perms shell script
This commit is contained in:
parent
2ea59dfae3
commit
e7051e0be5
1 changed files with 29 additions and 7 deletions
|
@ -1,10 +1,32 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# disable unused services
|
if [[ $# -eq 0 ]] ; then
|
||||||
chmod -x baikal/docker-compose.baikal.yml
|
echo 'Nothing to do'
|
||||||
chmod -x posteio/docker-compose.posteio.yml
|
exit 0
|
||||||
chmod -x netdata/docker-compose.netdata.yml
|
fi
|
||||||
chmod -x photo/docker-compose.pigallery.yml
|
|
||||||
|
case "$1" in
|
||||||
|
"on")
|
||||||
|
# disable unused services
|
||||||
|
chmod -x baikal/docker-compose.baikal.yml
|
||||||
|
chmod -x posteio/docker-compose.posteio.yml
|
||||||
|
chmod -x netdata/docker-compose.netdata.yml
|
||||||
|
chmod -x photo/docker-compose.pigallery.yml
|
||||||
|
# live server
|
||||||
|
chmod -x traefik/docker-compose.traefik-local.yml
|
||||||
|
exit 0;;
|
||||||
|
"off")
|
||||||
|
# restore state
|
||||||
|
chmod +x baikal/docker-compose.baikal.yml
|
||||||
|
chmod +x posteio/docker-compose.posteio.yml
|
||||||
|
chmod +x netdata/docker-compose.netdata.yml
|
||||||
|
chmod +x photo/docker-compose.pigallery.yml
|
||||||
|
chmod +x traefik/docker-compose.traefik-local.yml
|
||||||
|
exit 0;;
|
||||||
|
*)
|
||||||
|
echo "Unknown command: on/off are valid values"
|
||||||
|
exit 1;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# live server
|
|
||||||
chmod -x traefik/docker-compose.traefik-local.yml
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue