github.com/swiftstack/proxyfs@v0.0.0-20201223034610-5434d919416e/cookbooks/proxyfs/files/default/usr/bin/start_swift_only (about)

     1  #!/bin/bash
     2  
     3  # A simple script to start the swift services only
     4  # The PATH, etc should already be setup by systemctl environment
     5  
     6  sudo mount -a
     7  
     8  echo "Shutting down services and mount points..."
     9  /usr/bin/unmount_and_stop_pfs
    10  echo
    11  echo "Bringing up services..."
    12  if [ -f /usr/bin/systemctl ]; then
    13      # Centos
    14      sudo /usr/bin/systemctl start memcached
    15      sudo /usr/bin/swift-init main start
    16  else
    17      # Ubuntu (not tested!)
    18      sudo /usr/sbin/service memcached start
    19      sudo /usr/bin/swift-init main start
    20  fi