lgsm local mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

24 lines
673 B

#!/bin/bash
# LGSM fn_stopserver function
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 011214
fn_rootcheck
fn_syscheck
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -Ec "^${servicename}:")
fn_printdots "Stopping ${servicename}: ${servername}"
fn_scriptlog "Stopping ${servername}"
sleep 1
if [ "${pid}" == "0" ]; then
fn_printfail "Stopping ${servicename}: ${servername} is already stopped"
fn_scriptlog "${servername} is already stopped"
else
tmux kill-session -t ${servicename}
fn_printok "Stopping ${servicename}: ${servername}"
fn_scriptlog "Stopped ${servername}"
fi
# Remove lock file
rm -f "${lockselfname}"
sleep 1
echo -en "\n"