scripts

shell scripts
git clone git://git.bitsmanent.org/scripts
Log | Files | Refs | README

swss (338B)


      1 #!/bin/bash
      2 # simple web stack switch
      3 
      4 services=(
      5 redis-server
      6 mysql
      7 nginx
      8 #php5-fpm
      9 php7.2-fpm
     10 )
     11 
     12 massact() {
     13 	act=$1
     14 	for s in ${services[@]}
     15 	do
     16 		service $s $act &
     17 	done
     18 }
     19 
     20 main() {
     21 	case $1 in
     22 		start);;
     23 		stop);;
     24 		restart);;
     25 		status);;
     26 		*) echo "Usage: $0 [start|stop|restart|status]" ; exit 1 ;;
     27 	esac
     28 
     29 	massact $1
     30 }
     31 
     32 main "$@"