Debriefing > Questions, Help, & How To's

Ubuntu 16.04 x64 and Segmentation fault (core dumped)

<< < (3/4) > >>

Haizen007:

--- Code: ---
#!/bin/sh
# Default-Start:    2 3 4 5
# Default-Stop:     0 1 6

NAME="007 GoldenEye Server"
USER="steam"
GROUP="steam"
PATHTOFILE="/home/steam/GoldenEye"
EXECFILENAME="007.sh"
 
start() {
    echo -n "Starting $NAME..."
    /sbin/start-stop-daemon --start --quiet --chuid $USER:$GROUP --exec $PATHTOFILE/$EXECFILENAME start
}
 
stop() {
    echo -n "Stopping $NAME..."
    /sbin/start-stop-daemon --start --quiet --chuid $USER:$GROUP --exec $PATHTOFILE/$EXECFILENAME stop
}
 
restart() {
    echo -n "Restarting $NAME..."
    /sbin/start-stop-daemon --start --quiet --chuid $USER:$GROUP --exec $PATHTOFILE/$EXECFILENAME restart
}
 
case "$1" in
    start)
        start
    ;;
    stop)
        stop
    ;;
    restart)
        restart
    ;;
    *)
        echo "Usage: $0 (start|stop|restart)"
        exit 1
    ;; 
esac
exit 0
--- End code ---

I got 
--- Quote ---Starting 007 GoldenEye Server.../home/steam/GoldenEye/007.sh: 2: /home/steam/GoldenEye/007.sh: ./srcds_run: not found

--- End quote ---

And changing the 007.sh from

--- Code: ---
#!/bin/sh
MALLOC_CHECK_=0 ./srcds_run -game ./gesource/ +ip 207.246.66.49 +port 27015 +maxplayers 12 +map ge_temple_classic

--- End code ---
to

--- Code: ---
#!/bin/sh
#!/bin/sh
MALLOC_CHECK_=0 ./home/steam/GoldenEye/srcds_run -game ./home/steam/GoldenEye/gesource/ +ip 207.246.66.49 +port 27015 +maxplayers 12 +map ge_temple_classic

--- End code ---

I got:


--- Quote ---Starting 007 GoldenEye Server...Auto detecting CPU
Using SSE2 Optimised binary.
Source Engine binary './srcds_i486' not found, exiting
Mon Jan 22 17:14:53 -02 2018: Server Failed
--- End quote ---

soupcan:
I'll take a look at this and get back to you tonight or tomorrow. I've been meaning to write a sample systemd service file for a while, so I'll be setting up a local server to test with and get back to you with the result.

Haizen007:
Ok, that will be great.
Thank you very much!

jexact:
It seems that srcds_run is trying to access ./srcds_i486 relatively from the current working directory. Try this:

--- Code: ---
#!/bin/bash
export MALLOC_CHECK_=0
cd /home/steam/GoldenEye
exec ./srcds_run -game /home/steam/GoldenEye/gesource/ +ip 207.246.66.49 +port 27015 +maxplayers 12 +map ge_temple_classic

--- End code ---

PS.
This is how my systemd service file looked like in the past (switched to a docker based setup now):

File: /etc/systemd/system/gesource.service

--- Code: ---
[Unit]
Description=Goldeneye Source Server
After=network.target

[Service]
User=steam
Group=steam
Type=simple
ExecStart=/home/steam/srcds_run_gesource.sh
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

--- End code ---

Then you can enable the service via systemctl enable gesource.service and start it via systemctl start gesource.service etc.

Haizen007:
Thanks.
I changed my 007.sh file.
Create the

--- Code: ---
/lib/systemd/system/007.service
--- End code ---
following yours
Then:

--- Code: ---
ln -s /home/steam/GoldenEye/007.sh /etc/init.d/007
--- End code ---
To start with boot, I'm not sure if I did it the best way heheh
Then:

--- Code: ---
systemctl daemon-reload
update-rc.d 007 defaults
--- End code ---
It's working well and the commands too:

--- Code: ---
service 007 stop
service 007 start
service 007 status
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version