Merge branch 'master' into 1.2-dev

This commit is contained in:
Ben Peddell 2015-07-06 18:55:59 +10:00
commit 4761f14fd1
3 changed files with 15 additions and 4 deletions

View File

@ -25,6 +25,11 @@ if [ -f "${HOME}/.arkmanager.cfg" ]; then
source "${HOME}/.arkmanager.cfg" source "${HOME}/.arkmanager.cfg"
fi fi
lsof=lsof
if [ -x /usr/sbin/lsof ]; then
lsof=/usr/sbin/lsof
fi
# Local variables # Local variables
info="" info=""
thejob="" thejob=""
@ -185,7 +190,7 @@ function isTheServerRunning(){
# #
# #
function isTheServerUp(){ function isTheServerUp(){
lsof -i :"$ark_Port" > /dev/null $lsof -i :"$ark_Port" > /dev/null
result=$? result=$?
# In this case, the result is: # In this case, the result is:
# 1 if the command fail. The port is not listenning # 1 if the command fail. The port is not listenning

View File

@ -28,6 +28,3 @@ logdir="/var/log/arktools" # Logs path
# steamdb specific # steamdb specific
appid=376030 # Linux server App ID appid=376030 # Linux server App ID
# admin information
servermail="" # Log email, leave blank if you dont want to receive mail

View File

@ -16,6 +16,7 @@ if [ ! -z "$1" ]; then
chmod +x "${INSTALL_ROOT}${EXECPREFIX}/libexec/arkmanager/arkmanager.init" chmod +x "${INSTALL_ROOT}${EXECPREFIX}/libexec/arkmanager/arkmanager.init"
cp systemd/arkdeamon.service "${INSTALL_ROOT}/etc/systemd/system/arkmanager.service" cp systemd/arkdeamon.service "${INSTALL_ROOT}/etc/systemd/system/arkmanager.service"
sed -i "s|=/usr/|=${EXECPREFIX}/|" "${INSTALL_ROOT}/etc/systemd/system/arkmanager.service" sed -i "s|=/usr/|=${EXECPREFIX}/|" "${INSTALL_ROOT}/etc/systemd/system/arkmanager.service"
sed -i "s@^DAEMON=\"/usr@DAEMON=\"${EXECPREFIX}@" "${INSTALL_ROOT}${EXECPREFIX}/libexec/arkmanager/arkmanager.init"
if [ -z "${INSTALL_ROOT}" ]; then if [ -z "${INSTALL_ROOT}" ]; then
systemctl daemon-reload systemctl daemon-reload
systemctl enable arkmanager.service systemctl enable arkmanager.service
@ -41,6 +42,7 @@ if [ ! -z "$1" ]; then
chmod +x "${INSTALL_ROOT}${EXECPREFIX}/libexec/arkmanager/arkmanager.init" chmod +x "${INSTALL_ROOT}${EXECPREFIX}/libexec/arkmanager/arkmanager.init"
cp systemd/arkdeamon.service "${INSTALL_ROOT}/etc/systemd/system/arkmanager.service" cp systemd/arkdeamon.service "${INSTALL_ROOT}/etc/systemd/system/arkmanager.service"
sed -i "s|=/usr/|=${EXECPREFIX}/|" "${INSTALL_ROOT}/etc/systemd/system/arkmanager.service" sed -i "s|=/usr/|=${EXECPREFIX}/|" "${INSTALL_ROOT}/etc/systemd/system/arkmanager.service"
sed -i "s@^DAEMON=\"/usr@DAEMON=\"${EXECPREFIX}@" "${INSTALL_ROOT}${EXECPREFIX}/libexec/arkmanager/arkmanager.init"
if [ -z "${INSTALL_ROOT}" ]; then if [ -z "${INSTALL_ROOT}" ]; then
systemctl daemon-reload systemctl daemon-reload
systemctl enable arkmanager.service systemctl enable arkmanager.service
@ -72,6 +74,7 @@ if [ ! -z "$1" ]; then
chmod +x "${INSTALL_ROOT}${EXECPREFIX}/libexec/arkmanager/arkmanager.init" chmod +x "${INSTALL_ROOT}${EXECPREFIX}/libexec/arkmanager/arkmanager.init"
cp systemd/arkdeamon.service "${INSTALL_ROOT}/etc/systemd/system/arkmanager.service" cp systemd/arkdeamon.service "${INSTALL_ROOT}/etc/systemd/system/arkmanager.service"
sed -i "s|=/usr/|=${EXECPREFIX}/|" "${INSTALL_ROOT}/etc/systemd/system/arkmanager.service" sed -i "s|=/usr/|=${EXECPREFIX}/|" "${INSTALL_ROOT}/etc/systemd/system/arkmanager.service"
sed -i "s@^DAEMON=\"/usr@DAEMON=\"${EXECPREFIX}@" "${INSTALL_ROOT}${EXECPREFIX}/libexec/arkmanager/arkmanager.init"
if [ -z "${INSTALL_ROOT}" ]; then if [ -z "${INSTALL_ROOT}" ]; then
systemctl enable arkmanager.service systemctl enable arkmanager.service
echo "Ark server will now start on boot, if you want to remove this feature run the following line" echo "Ark server will now start on boot, if you want to remove this feature run the following line"
@ -100,6 +103,12 @@ if [ ! -z "$1" ]; then
else else
echo "You must specify your system steam user who own steamcmd directory to install ARK Tools." echo "You must specify your system steam user who own steamcmd directory to install ARK Tools."
echo "Usage: ./install.sh steam" echo "Usage: ./install.sh steam"
echo
echo "Environment variables affecting install:"
echo "EXECPREFIX: prefix in which to install arkmanager executable"
echo " [${EXECPREFIX}]"
echo "INSTALL_ROOT: staging directory in which to perform install"
echo " [${INSTALL_ROOT}]"
exit 1 exit 1
fi fi