start_services.sh 610 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. # fail if any commands fails
  3. set -e
  4. # debug log
  5. #set -x
  6. # Set superuser privileges command if not set
  7. if [[ -z $su ]]; then
  8. export su="sudo"
  9. fi
  10. # read -rp "Enter used init sistem name (sysvinit|openrc|runit)" init_system
  11. # # start docker
  12. # if [ "$init_system" = "sysvinit" ]; then
  13. # $su /etc/init.d/docker start
  14. # fi
  15. # if [ "$init_system" = "openrc" ]; then
  16. # $su rc-update add docker default
  17. # $su rc-service docker start
  18. # fi
  19. # if [ "$init_system" = "runit" ]; then
  20. # $su sv up docker
  21. # fi
  22. # setup docker
  23. $su groupadd docker || true
  24. $su gpasswd -a $USER docker || true