Ubuntu Pastebin

Paste from ioria at Mon, 12 Sep 2016 19:33:30 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#!/bin/bash
if [[ $(ps -A  | grep some)  ]]
then
    echo "Server is running, do you want to stop your server? [Y/n]" 
    read response
    if [[ "$response" == "yes" || "$response" == "y" ]]
    then
        echo "Stopping server now!"
    fi
else
    echo "Starting server your server now!"
fi
Download as text