FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Server Development

 
 
LinkBack Thread Tools
 
Old 05-19-2012, 03:50 PM
Marcos Barbosa
 
Default Byobu autostart from cron

Do you try byobu-enable?

2012/5/19 Whisperity <whisperity@gmail.com>:
> Dear fellow Ubuntu users,
>
> I have an automatation question I'd like to ask from you. My server runs
> some servers which are, unfortunately, not daemons (like Minecraft or Source
> Dedicated Server). I am planning on making them automatically start at boot
> with the @reboot directive in crontab, but I wish their sessions to be
> usable from byobu.
>
> Problem being, that byobu does not auto-start. I have written a shell
> script:
>
> #!/bin/bash
> screen -dr byobu -X screen -t srcds
>
> screen -r byobu -p srcds -X stuff "./start_gmod.sh $(printf '
')"
>
> And I execute it as my nonprivileged user in crontab:
>
> @reboot * * * * * sourcesrv * * * * * * * * * *cd /srv/srcds/orangebox &&
> ./hook-byobu.sh
>
> However, running this script requires byobu to be started when it runs. If I
> test the script with starting byobu by hand and then executing it from SSH,
> it does order byobu to make a new window and then starts the server.
>
> My question being: can I, somehow, automatize the start of byobu into the
> hook-byobu.sh file? I tried adding byobu (the command itself) after the
> shebang-line, but then it hangs until I, by hand, F6 (detach) from byobu.
>
> Turning byobu's Start automatically after log in on does not work, because
> there is no login to happen, as the script is started from cron.
>
>
> --
> ubuntu-server mailing list
> ubuntu-server@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
> More info: https://wiki.ubuntu.com/ServerTeam



--
Marcos Barbosa <marcosestevesbarbosa@gmail.com>

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 05-19-2012, 03:50 PM
Marcos Barbosa
 
Default Byobu autostart from cron

Do you try byobu-enable?

2012/5/19 Whisperity <whisperity@gmail.com>:
> Dear fellow Ubuntu users,
>
> I have an automatation question I'd like to ask from you. My server runs
> some servers which are, unfortunately, not daemons (like Minecraft or Source
> Dedicated Server). I am planning on making them automatically start at boot
> with the @reboot directive in crontab, but I wish their sessions to be
> usable from byobu.
>
> Problem being, that byobu does not auto-start. I have written a shell
> script:
>
> #!/bin/bash
> screen -dr byobu -X screen -t srcds
>
> screen -r byobu -p srcds -X stuff "./start_gmod.sh $(printf '
')"
>
> And I execute it as my nonprivileged user in crontab:
>
> @reboot * * * * * sourcesrv * * * * * * * * * *cd /srv/srcds/orangebox &&
> ./hook-byobu.sh
>
> However, running this script requires byobu to be started when it runs. If I
> test the script with starting byobu by hand and then executing it from SSH,
> it does order byobu to make a new window and then starts the server.
>
> My question being: can I, somehow, automatize the start of byobu into the
> hook-byobu.sh file? I tried adding byobu (the command itself) after the
> shebang-line, but then it hangs until I, by hand, F6 (detach) from byobu.
>
> Turning byobu's Start automatically after log in on does not work, because
> there is no login to happen, as the script is started from cron.
>
>
> --
> ubuntu-server mailing list
> ubuntu-server@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
> More info: https://wiki.ubuntu.com/ServerTeam



--
Marcos Barbosa <marcosestevesbarbosa@gmail.com>

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-19-2012, 07:26 PM
Whisperity
 
Default Byobu autostart from cron

byobu-enable only changes the user's configuration to automatically load byobu after a shell was initiated. However, as described earlier:
> Turning byobu's Start automatically after log in on does not work, because


> there is no login to happen, as the script is started from cron.

2012/5/19 Marcos Barbosa <marcosestevesbarbosa@gmail.com>

Do you try byobu-enable?



2012/5/19 Whisperity <whisperity@gmail.com>:

> Dear fellow Ubuntu users,

>

> I have an automatation question I'd like to ask from you. My server runs

> some servers which are, unfortunately, not daemons (like Minecraft or Source

> Dedicated Server). I am planning on making them automatically start at boot

> with the @reboot directive in crontab, but I wish their sessions to be

> usable from byobu.

>

> Problem being, that byobu does not auto-start. I have written a shell

> script:

>

> #!/bin/bash

> screen -dr byobu -X screen -t srcds

>

> screen -r byobu -p srcds -X stuff "./start_gmod.sh $(printf '
')"

>

> And I execute it as my nonprivileged user in crontab:

>

> @reboot * * * * * sourcesrv * * * * * * * * * *cd /srv/srcds/orangebox &&

> ./hook-byobu.sh

>

> However, running this script requires byobu to be started when it runs. If I

> test the script with starting byobu by hand and then executing it from SSH,

> it does order byobu to make a new window and then starts the server.

>

> My question being: can I, somehow, automatize the start of byobu into the

> hook-byobu.sh file? I tried adding byobu (the command itself) after the

> shebang-line, but then it hangs until I, by hand, F6 (detach) from byobu.

>

> Turning byobu's Start automatically after log in on does not work, because

> there is no login to happen, as the script is started from cron.

>

>

> --

> ubuntu-server mailing list

> ubuntu-server@lists.ubuntu.com

> https://lists.ubuntu.com/mailman/listinfo/ubuntu-server

> More info: https://wiki.ubuntu.com/ServerTeam







--

Marcos Barbosa <marcosestevesbarbosa@gmail.com>



--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 05-19-2012, 07:26 PM
Whisperity
 
Default Byobu autostart from cron

byobu-enable only changes the user's configuration to automatically load byobu after a shell was initiated. However, as described earlier:
> Turning byobu's Start automatically after log in on does not work, because


> there is no login to happen, as the script is started from cron.

2012/5/19 Marcos Barbosa <marcosestevesbarbosa@gmail.com>

Do you try byobu-enable?



2012/5/19 Whisperity <whisperity@gmail.com>:

> Dear fellow Ubuntu users,

>

> I have an automatation question I'd like to ask from you. My server runs

> some servers which are, unfortunately, not daemons (like Minecraft or Source

> Dedicated Server). I am planning on making them automatically start at boot

> with the @reboot directive in crontab, but I wish their sessions to be

> usable from byobu.

>

> Problem being, that byobu does not auto-start. I have written a shell

> script:

>

> #!/bin/bash

> screen -dr byobu -X screen -t srcds

>

> screen -r byobu -p srcds -X stuff "./start_gmod.sh $(printf '
')"

>

> And I execute it as my nonprivileged user in crontab:

>

> @reboot * * * * * sourcesrv * * * * * * * * * *cd /srv/srcds/orangebox &&

> ./hook-byobu.sh

>

> However, running this script requires byobu to be started when it runs. If I

> test the script with starting byobu by hand and then executing it from SSH,

> it does order byobu to make a new window and then starts the server.

>

> My question being: can I, somehow, automatize the start of byobu into the

> hook-byobu.sh file? I tried adding byobu (the command itself) after the

> shebang-line, but then it hangs until I, by hand, F6 (detach) from byobu.

>

> Turning byobu's Start automatically after log in on does not work, because

> there is no login to happen, as the script is started from cron.

>

>

> --

> ubuntu-server mailing list

> ubuntu-server@lists.ubuntu.com

> https://lists.ubuntu.com/mailman/listinfo/ubuntu-server

> More info: https://wiki.ubuntu.com/ServerTeam







--

Marcos Barbosa <marcosestevesbarbosa@gmail.com>



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 04:47 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org