automatic add to the startup on sysinit system

This commit is contained in:
Sispheor 2015-06-21 21:02:09 +02:00
parent 1170042f28
commit 6e0d872b48
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,4 @@
#!/bin/bash
### BEGIN INIT INFO
# Provides: ARK manager deamon
# Required-Start: networking

View File

@ -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