mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-25 15:58:27 +00:00
Copy Debian init script to /usr/libexec/arkmanager
This commit is contained in:
parent
ebb1ccb2c8
commit
f196df51c6
@ -11,11 +11,14 @@ if [ ! -z "$1" ]; then
|
|||||||
if [ -f /lib/lsb/init-functions ]; then
|
if [ -f /lib/lsb/init-functions ]; then
|
||||||
# on debian 8, sysvinit and systemd are present. If systemd is available we use it instead of sysvinit
|
# on debian 8, sysvinit and systemd are present. If systemd is available we use it instead of sysvinit
|
||||||
if [[ -f /etc/systemd/system.conf ]]; then # used by systemd
|
if [[ -f /etc/systemd/system.conf ]]; then # used by systemd
|
||||||
|
mkdir -p "/usr/libexec/arkmanager"
|
||||||
|
cp lsb/arkdaemon "/usr/libexec/arkmanager/arkmanager.init"
|
||||||
|
chmod +x "/usr/libexec/arkmanager/arkmanager.init"
|
||||||
cp systemd/arkdeamon.service /etc/systemd/system/arkdaemon.service
|
cp systemd/arkdeamon.service /etc/systemd/system/arkdaemon.service
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable arkdeamon.service
|
systemctl enable arkdaemon.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"
|
||||||
echo "systemctl disable unit"
|
echo "systemctl disable arkmanager.service"
|
||||||
else # systemd not present, so use sysvinit
|
else # systemd not present, so use sysvinit
|
||||||
cp lsb/arkdaemon "${INSTALL_ROOT}/etc/init.d/arkmanager"
|
cp lsb/arkdaemon "${INSTALL_ROOT}/etc/init.d/arkmanager"
|
||||||
chmod +x "${INSTALL_ROOT}/etc/init.d/arkmanager"
|
chmod +x "${INSTALL_ROOT}/etc/init.d/arkmanager"
|
||||||
|
|||||||
@ -3,8 +3,8 @@ Description=Daemon to start ark server
|
|||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/etc/init.d/arkdaemon start
|
ExecStart=/usr/libexec/arkmanager/arkmanager.init start
|
||||||
ExecStop=/etc/init.d/arkdaemon stop
|
ExecStop=/usr/libexec/arkmanager/arkmanager.init stop
|
||||||
Type=forking
|
Type=forking
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user