From 6e0d872b48839dbcc3f982c1d3f103f68d446326 Mon Sep 17 00:00:00 2001 From: Sispheor Date: Sun, 21 Jun 2015 21:02:09 +0200 Subject: [PATCH] automatic add to the startup on sysinit system --- tools/arkdaemon | 1 + tools/install.sh | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/arkdaemon b/tools/arkdaemon index 853c88e..08b635a 100755 --- a/tools/arkdaemon +++ b/tools/arkdaemon @@ -1,3 +1,4 @@ +#!/bin/bash ### BEGIN INIT INFO # Provides: ARK manager deamon # Required-Start: networking diff --git a/tools/install.sh b/tools/install.sh index 1a02ac9..0cf076c 100644 --- a/tools/install.sh +++ b/tools/install.sh @@ -5,9 +5,15 @@ if [ ! -z $1 ]; then cp arkmanager /usr/bin/arkmanager chmod +x /usr/bin/arkmanager - # Copy arkdaemon to /etc/init.d and set permissions + # Copy arkdaemon to /etc/init.d ,set permissions and add it to boot 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 + 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" + fi # Create a folder in /var/log to let Ark tools write its own log files mkdir -p /var/log/arktools