free

News

collapse

User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Recent Posts

NOTICE OF PARKING ENFORCEMENT CHANGES by Huntsman
[June 19, 2025, 05:22:50 pm]


Re: Stopping by by Sinister
[June 08, 2025, 01:58:04 pm]


Re: Stopping by by Ehks
[June 04, 2025, 12:25:17 am]


Re: Rest in peace by Stefanrsb
[June 02, 2025, 03:38:02 am]


Re: [SA:MP]House of Sforza | The Elite Power | Estd. 2006 | LS - LV by Stefanrsb
[June 02, 2025, 03:09:22 am]


Re: The Soprano Family | Royal Loyalty by Stefanrsb
[June 02, 2025, 03:00:31 am]


Re: The Gvardia Family || San Fierro's Main Power || Best criminal group of 09/10/11 by Stefanrsb
[June 02, 2025, 02:47:01 am]


Re: BALLAS | In memory of INFERNO 9 and NBA by Stefanrsb
[June 02, 2025, 02:31:29 am]


Re: Count to 1,000,000. by Stefanrsb
[June 02, 2025, 02:15:04 am]


Re: Stopping by by Traser
[June 01, 2025, 10:23:13 pm]


Re: Stopping by by Old Catzu
[May 18, 2025, 07:27:06 pm]


Re: Stopping by by TheRock
[May 18, 2025, 06:44:49 am]

* Who's Online

  • Dot Guests: 323
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Birthday Calender

July 2025
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5
6 7 8 9 10 11 12
13 [14] 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31

[Bash] Halp with script

Teddy · 1132

0 Members and 1 Guest are viewing this topic.

Offline TeddyTopic starter

  • Orc
  • *****
    • Posts: 9161
  • "I'm on top of the world because of you."
  • With us since: 05/02/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
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?



Offline SugarD

  • Hero
  • ****
    • Posts: 11515
    With us since: 21/03/2008
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #1 on: October 23, 2014, 11:30:04 am
Did you ever get this issue resolved?



Offline TeddyTopic starter

  • Orc
  • *****
    • Posts: 9161
  • "I'm on top of the world because of you."
  • With us since: 05/02/2011
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
Reply #2 on: October 23, 2014, 08:48:48 pm
YES DADDY



Offline Archie

  • Veteran
  • ***
    • Posts: 974
  • Sven_Clark
  • With us since: 12/10/2013
    YearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYearsYears
  • SA:MP: Archie
Reply #3 on: October 23, 2014, 09:44:24 pm
It's locked.

back again!


 


free
SimplePortal 2.3.7 © 2008-2025, SimplePortal