|
@@ -2,7 +2,7 @@
|
|
|
# LGSM fn_start function
|
|
# LGSM fn_start function
|
|
|
# Author: Daniel Gibbs
|
|
# Author: Daniel Gibbs
|
|
|
# Website: http://gameservermanagers.com
|
|
# Website: http://gameservermanagers.com
|
|
|
-# Version: 220415
|
|
|
|
|
|
|
+# Version: 070515
|
|
|
|
|
|
|
|
# Description: Starts the server.
|
|
# Description: Starts the server.
|
|
|
|
|
|
|
@@ -119,26 +119,33 @@ else
|
|
|
fi
|
|
fi
|
|
|
sleep 1
|
|
sleep 1
|
|
|
tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -Ec "^${servicename}:")
|
|
tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -Ec "^${servicename}:")
|
|
|
-
|
|
|
|
|
# If the server fails to start
|
|
# If the server fails to start
|
|
|
if [ "${tmuxwc}" -eq 0 ]; then
|
|
if [ "${tmuxwc}" -eq 0 ]; then
|
|
|
fn_printfail "Unable to start ${servername}"
|
|
fn_printfail "Unable to start ${servername}"
|
|
|
fn_scriptlog "Unable to start ${servername}"
|
|
fn_scriptlog "Unable to start ${servername}"
|
|
|
sleep 1
|
|
sleep 1
|
|
|
if [ -s "${scriptlogdir}/.${servicename}-tmux-error.tmp" ]; then
|
|
if [ -s "${scriptlogdir}/.${servicename}-tmux-error.tmp" ]; then
|
|
|
- fn_printfail "Unable to start ${servername}: Tmux returned the following error:"
|
|
|
|
|
- fn_scriptlog "tmux returned the following error"
|
|
|
|
|
|
|
+ fn_printfail "Unable to start ${servername}: Tmux error:"
|
|
|
|
|
+ fn_scriptlog "Tmux error"
|
|
|
sleep 1
|
|
sleep 1
|
|
|
echo -en "\n"
|
|
echo -en "\n"
|
|
|
echo ""
|
|
echo ""
|
|
|
|
|
+ echo "Command"
|
|
|
|
|
+ echo "================================="
|
|
|
|
|
+ echo "tmux new-session -d -s ${servicename} "${executable} ${parms}""
|
|
|
|
|
+ echo "tmux new-session -d -s ${servicename} "${executable} ${parms}"" >> "${scriptlog}"
|
|
|
|
|
+ echo ""
|
|
|
|
|
+ echo "Error"
|
|
|
|
|
+ echo "================================="
|
|
|
cat "${scriptlogdir}/.${servicename}-tmux-error.tmp"
|
|
cat "${scriptlogdir}/.${servicename}-tmux-error.tmp"
|
|
|
cat "${scriptlogdir}/.${servicename}-tmux-error.tmp" >> "${scriptlog}"
|
|
cat "${scriptlogdir}/.${servicename}-tmux-error.tmp" >> "${scriptlog}"
|
|
|
- sleep 1
|
|
|
|
|
- echo ""
|
|
|
|
|
|
|
+
|
|
|
# Detected error http://gameservermanagers.com/issues
|
|
# Detected error http://gameservermanagers.com/issues
|
|
|
if [ $(grep -c "Operation not permitted" "${scriptlogdir}/.${servicename}-tmux-error.tmp") ];then
|
|
if [ $(grep -c "Operation not permitted" "${scriptlogdir}/.${servicename}-tmux-error.tmp") ];then
|
|
|
|
|
+ echo ""
|
|
|
|
|
+ echo "Fix"
|
|
|
|
|
+ echo "================================="
|
|
|
if [ ! $(grep "tty:" /etc/group|grep "$(whoami)") ];then
|
|
if [ ! $(grep "tty:" /etc/group|grep "$(whoami)") ];then
|
|
|
- echo "================================="
|
|
|
|
|
echo "$(whoami) is not part of the tty group."
|
|
echo "$(whoami) is not part of the tty group."
|
|
|
fn_scriptlog "$(whoami) is not part of the tty group."
|
|
fn_scriptlog "$(whoami) is not part of the tty group."
|
|
|
group=$(grep tty /etc/group)
|
|
group=$(grep tty /etc/group)
|
|
@@ -152,16 +159,9 @@ if [ "${tmuxwc}" -eq 0 ]; then
|
|
|
echo ""
|
|
echo ""
|
|
|
echo "http://gameservermanagers.com/tmux-op-perm"
|
|
echo "http://gameservermanagers.com/tmux-op-perm"
|
|
|
fn_scriptlog "http://gameservermanagers.com/tmux-op-perm"
|
|
fn_scriptlog "http://gameservermanagers.com/tmux-op-perm"
|
|
|
- echo "================================="
|
|
|
|
|
else
|
|
else
|
|
|
- echo "$(whoami) is part of the tty group."
|
|
|
|
|
- group=$(grep tty /etc/group)
|
|
|
|
|
- echo ""
|
|
|
|
|
- echo " ${group}"
|
|
|
|
|
- fn_scriptlog "${group}"
|
|
|
|
|
- echo ""
|
|
|
|
|
- echo "No known fix currently."
|
|
|
|
|
- fn_scriptlog "No known fix currently."
|
|
|
|
|
|
|
+ echo "No known fix currently. Please log an issue."
|
|
|
|
|
+ fn_scriptlog "No known fix currently. Please log an issue."
|
|
|
echo "http://gameservermanagers.com/issues"
|
|
echo "http://gameservermanagers.com/issues"
|
|
|
fn_scriptlog "http://gameservermanagers.com/issues"
|
|
fn_scriptlog "http://gameservermanagers.com/issues"
|
|
|
fi
|
|
fi
|