Skip to content

Commit 08c9429

Browse files
authored
Merge pull request #103 from Bisa/issue/#100-stopping-with-systemd-causes-timeout
skip the random gen, caused systemd to hang, fixes issue #100
2 parents 5790ad9 + 86df855 commit 08c9429

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

factorio

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,8 @@ stop_service() {
241241
send_cmd(){
242242
if is_running; then
243243
if [ -p ${FIFO} ]; then
244-
# Grab a random 16 character id for our command
245-
cmdid=$(cat /dev/urandom |tr -dc 'a-zA-Z0-9' |fold -w 16 |head -n 1)
246-
# Whisper that unknown player named after our random id
244+
cmdid="FACTORIO_INIT_CMD_DELIMITER"
245+
# Whisper that unknown player
247246
echo "/w ${cmdid}" > ${FIFO}
248247
# Wait for factorio to read stdin
249248
sleep 1

0 commit comments

Comments
 (0)