mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-15 20:08:29 +00:00
commit
21ff0473ed
@ -72,13 +72,6 @@ Get the status of the server. Show if the process is running, if the server is u
|
||||
#### arkmanager checkupdate
|
||||
Check if a new version of the server is available but not apply it
|
||||
|
||||
#### arkmanager broadcast [message]
|
||||
broadcast a message to ARK server chat
|
||||
|
||||
```sh
|
||||
arkmanager broadcast "your message here"
|
||||
```
|
||||
|
||||
## Credits
|
||||
|
||||
Original author of arkmanager: LeXaT
|
||||
|
||||
@ -12,24 +12,25 @@ tar -zxvf master.tar.gz
|
||||
# Install ARK Server Tools
|
||||
cd ark-server-tools-master/tools
|
||||
chmod +x install.sh
|
||||
sh install.sh $1
|
||||
sh install.sh $1 > /dev/null
|
||||
|
||||
status = $?
|
||||
status=$?
|
||||
|
||||
# Remove the installation files
|
||||
rm -f master.tar.gz
|
||||
rm -rf /tmp/ark-server-tools-master
|
||||
|
||||
# Print messages
|
||||
case "$status" in
|
||||
"0")
|
||||
echo "ARK Server Tools were correctly installed in your system inside the home directory of $1!"
|
||||
;;
|
||||
|
||||
if [ $status == 0 ]; then
|
||||
echo "ARK Server Tools were correctly installed in your system inside the home directory of $1!"
|
||||
fi
|
||||
|
||||
if [ $status == 1 ]; then
|
||||
echo "Something where wrong :("
|
||||
fi
|
||||
|
||||
if [ $status == 2 ]; then
|
||||
echo "WARNING: A previous version of ARK Server Tools was detected in your system, your old configuration was not overwritten. You may need to manually update it."
|
||||
echo "ARK Server Tools were correctly installed in your system inside the home directory of $1!"
|
||||
fi
|
||||
"1")
|
||||
echo "Something where wrong :("
|
||||
;;
|
||||
"2")
|
||||
echo "WARNING: A previous version of ARK Server Tools was detected in your system, your old configuration was not overwritten. You may need to manually update it."
|
||||
echo "ARK Server Tools were correctly installed in your system inside the home directory of $1!"
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -139,7 +139,7 @@ doStop() {
|
||||
# kill the server with the PID
|
||||
PID=`ps -ef | grep "$arkserverroot/$arkserverexec" | grep -v grep | awk '{print $2}'`
|
||||
kill -9 $PID
|
||||
echo "$timestamp: stop" >> "$logdir/arkserver.log"
|
||||
echo "$timestamp: stop" >> "$logdir/arkserver.log"
|
||||
else
|
||||
echo "The server is already stopped"
|
||||
fi
|
||||
@ -189,16 +189,11 @@ doUpdate() {
|
||||
echo "$bnumber" > "$arkserverroot/arkversion"
|
||||
cd $steamcmdroot
|
||||
echo "$timestamp: update to $bnumber complete" >> "$logdir/update.log"
|
||||
tail -n 1 "$logdir/arkserver.log"
|
||||
|
||||
|
||||
# we restart the server only if it was started before the update
|
||||
if [ $serverWasAlive -eq 1 ]; then
|
||||
doStart
|
||||
fi
|
||||
# send mail to admin
|
||||
#if [ -z $servermail ]; then
|
||||
# mail -a $logdir/update.log -s "Update-Log" $servermail < /dev/null
|
||||
#fi
|
||||
else
|
||||
echo "No update available"
|
||||
echo "$timestamp: No update needed." >> "$logdir/update.log"
|
||||
@ -206,16 +201,6 @@ doUpdate() {
|
||||
fi;
|
||||
}
|
||||
|
||||
#
|
||||
# Broadcast message to server
|
||||
#
|
||||
doInfo() {
|
||||
if [ ! -z $1 ]; then
|
||||
info=$1
|
||||
fi
|
||||
screen -S "$servicename" -p 0 -X stuff "broadcast $info $(printf \\r)"
|
||||
}
|
||||
|
||||
#
|
||||
# Print the status of the server (running? online? version?)
|
||||
#
|
||||
@ -250,13 +235,10 @@ case "$1" in
|
||||
restart)
|
||||
doStop
|
||||
echo "$timestamp: stop" >> "$logdir/arkserver.log"
|
||||
tail -n 1 "$logdir/arkserver.log"
|
||||
sleep 10
|
||||
doStart
|
||||
echo "$timestamp: start" >> "$logdir/arkserver.log"
|
||||
tail -n 1 "$logdir/arkserver.log"
|
||||
echo "$timestamp: restart" >> "$logdir/arkserver.log"
|
||||
tail -n 1 "$logdir/arkserver.log"
|
||||
;;
|
||||
install)
|
||||
doInstall
|
||||
|
||||
@ -9,7 +9,7 @@ if [ ! -z $1 ]; then
|
||||
cp arkdaemon /etc/init.d/arkdaemon
|
||||
chmod +x /etc/init.d/arkdaemon
|
||||
# add to startup if the system use sysinit
|
||||
if [ test -x /usr/sbin/update-rc.d ]; then
|
||||
if [ -x /usr/sbin/update-rc.d ]; then
|
||||
update-rc.d arkdaemon defaults
|
||||
echo "Ark server will now start on boot, if you want to remove this feature run the following line"
|
||||
echo "update-rc.d -f arkdaemon remove"
|
||||
@ -20,9 +20,8 @@ if [ ! -z $1 ]; then
|
||||
chown $1 /var/log/arktools
|
||||
|
||||
# Copy arkmanager.cfg inside linux configuation folder if it doesn't already exists
|
||||
mkdir -p /etc/arkmanager
|
||||
if [ -f /etc/arkmanager/arkmanager.cfg ]; then
|
||||
echo "A previous version of ARK Server Tools was detected in your system, your old configuration was not overwritten. You may need to manually update it.";
|
||||
echo "A previous version of ARK Server Tools was detected in your system, your old configuration was not overwritten. You may need to manually update it."
|
||||
exit 2
|
||||
else
|
||||
cp -n arkmanager.cfg /etc/arkmanager/arkmanager.cfg
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user