Skip to content

Commit

Permalink
Merge pull request #103 from Bisa/issue/#100-stopping-with-systemd-ca…
Browse files Browse the repository at this point in the history
…uses-timeout

skip the random gen, caused systemd to hang, fixes issue #100
  • Loading branch information
Bisa authored Mar 14, 2017
2 parents 5790ad9 + 86df855 commit 08c9429
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions factorio
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,8 @@ stop_service() {
send_cmd(){
if is_running; then
if [ -p ${FIFO} ]; then
# Grab a random 16 character id for our command
cmdid=$(cat /dev/urandom |tr -dc 'a-zA-Z0-9' |fold -w 16 |head -n 1)
# Whisper that unknown player named after our random id
cmdid="FACTORIO_INIT_CMD_DELIMITER"
# Whisper that unknown player
echo "/w ${cmdid}" > ${FIFO}
# Wait for factorio to read stdin
sleep 1
Expand Down

0 comments on commit 08c9429

Please sign in to comment.