Argonath RPG - A World of its own

Argonath RPG Community => Hardware/Software support => Resolved issues => Topic started by: Teddy on August 11, 2014, 07:31:42 am

Title: [Bash] Halp with script
Post by: Teddy on August 11, 2014, 07:31:42 am
Hi,

Over in TeamSpeak we have a problem during the daily restart that appears to crash the TS3 bot clients. Since they're running on Linux an easy solution to reconnected is a bit of a challenge. So I want to have a cron run every 5 minutes to kick the bot back up. It runs on a screen called "music", here is the current script:

Code: [Select]
#!/bin/bash
if ps aux | grep "[.]/ts3client_linux_amd64" > /dev/null
then
    echo "AYEOK"
else
    screen -X -S music quit
    screen -S music -d -m
    screen -r music -p 0 -X stuff "sh /root/MusicBot/boot.sh `echo -ne '\015'`"
fi

The idea is to kill the existing music screen, then recreate it and throw a command at it. The problem is the command only sits in the screen terminal and doesn't enter. the `echo -ne '\015'` should in enter the command.. in theory.

The detection works fine.

Any ideas?
Title: Re: [Bash] Halp with script
Post by: SugarD on October 23, 2014, 11:30:04 am
Did you ever get this issue resolved?
Title: Re: [Bash] Halp with script
Post by: Teddy on October 23, 2014, 08:48:48 pm
YES DADDY
Title: Re: [Bash] Halp with script
Post by: Archie on October 23, 2014, 09:44:24 pm
It's locked.
SimplePortal 2.3.7 © 2008-2025, SimplePortal