Steamcast (and others) with Plesk 8 Crontab
-
- Posts: 8
- Joined: Mon Sep 17, 2007 3:31 am
- Location: Germany
- Contact:
Steamcast (and others) with Plesk 8 Crontab
Hello,
System:
Root Server i686
Suse Linux v10.2
Plesk v8.2.0
Rights:
Normal User
Starting of Steamcast, Shoutcast etc. is possible
Idea:
I want to start (if possible, then stop, too) my Steamcast Server with an Crontab (Cronjob) over the Plesk Interface.
Reason:
Under the week, I work behind a Firewall, where I can't log me into the SSH. I don't want to wait until the weekend, to start the Server, if it is down, for any reason.
Current Testings:
I tried to start the Server with the following Command, but it won't work:
http://tinyurl.com/yv25k3
Update:
Now it work with the following command, to start the Server:
To stop it, I use the command, that Jay tell in another thread:
I hope, anybody can help.
Thanks before.
System:
Root Server i686
Suse Linux v10.2
Plesk v8.2.0
Rights:
Normal User
Starting of Steamcast, Shoutcast etc. is possible
Idea:
I want to start (if possible, then stop, too) my Steamcast Server with an Crontab (Cronjob) over the Plesk Interface.
Reason:
Under the week, I work behind a Firewall, where I can't log me into the SSH. I don't want to wait until the weekend, to start the Server, if it is down, for any reason.
Current Testings:
I tried to start the Server with the following Command, but it won't work:
http://tinyurl.com/yv25k3
Update:
Now it work with the following command, to start the Server:
Code: Select all
cd /srv/www/vhosts/mysite.tld/steamcast; ./steamcast > /dev/null &
Code: Select all
http://yourserver:8000/admin/?shutdown=y
Thanks before.
Last edited by blueice_haller on Tue Sep 18, 2007 6:21 am, edited 4 times in total.
sincerely yours, blueice_haller
First of all, have you tested running something else with that same method? perhaps a simple "hello world" shell script? (in this case, one that writes hello world to a file you can later read, and check modification time on).
also, whatever user is running cron needs to have execution rights to the binary, and read/write access to the dir. do you know if those are valid?
also, whatever user is running cron needs to have execution rights to the binary, and read/write access to the dir. do you know if those are valid?
-
- Posts: 8
- Joined: Mon Sep 17, 2007 3:31 am
- Location: Germany
- Contact:
No, but I try it, now.Lane wrote:First of all, have you tested running something else with that same method? perhaps a simple "hello world" shell script? (in this case, one that writes hello world to a file you can later read, and check modification time on).
I thought, that the user, which I use for SSH access, is the same, who execute crontabs. If this is so, it should work.Lane wrote:also, whatever user is running cron needs to have execution rights to the binary, and read/write access to the dir. do you know if those are valid?
sincerely yours, blueice_haller
-
- Posts: 8
- Joined: Mon Sep 17, 2007 3:31 am
- Location: Germany
- Contact:
Current testing script:
Execution command:
blueicehaller -x /srv/vhosts/mysite.tld/test/test.sh
The user
What to do: -x = Execute ?
The directory, where the script is
Is this correct ? Or do you have a good introduction ? I'm a newby in cronetabs
Code: Select all
#!/bin/sh
# Simple Example
echo Hello, World!
blueicehaller -x /srv/vhosts/mysite.tld/test/test.sh
The user
What to do: -x = Execute ?
The directory, where the script is
Is this correct ? Or do you have a good introduction ? I'm a newby in cronetabs
sincerely yours, blueice_haller
your hello world test needs to write to a file, so you'll see the output. try something like this
echo "hello world" > /path/to/steamcastdir/helloworld.txt
I don't know much about plesk, so I can't really help you with it's quirks. But I think you should probably study up on this stuff a little more first, as you need to do a few things.
to have it run:
1) check if it's running
2) if it is, do nothing. if it isn't, start it
to have it stop, similar process.
1) check if it's running
2) stop it. ( you probably want to know it's pid to do that.)
If you can figure out how to do that via your shell prompt, you can probably cron it. Have you cron call a script, instead of executing a single command. You'll need to check and make decisions in the script, more than is comfy on a single line. (looks like you get that part already)
chmod +x test.sh would make your script executable. if you do an ls- l, you should see the permissions for your files.
echo "hello world" > /path/to/steamcastdir/helloworld.txt
I don't know much about plesk, so I can't really help you with it's quirks. But I think you should probably study up on this stuff a little more first, as you need to do a few things.
to have it run:
1) check if it's running
2) if it is, do nothing. if it isn't, start it
to have it stop, similar process.
1) check if it's running
2) stop it. ( you probably want to know it's pid to do that.)
If you can figure out how to do that via your shell prompt, you can probably cron it. Have you cron call a script, instead of executing a single command. You'll need to check and make decisions in the script, more than is comfy on a single line. (looks like you get that part already)
chmod +x test.sh would make your script executable. if you do an ls- l, you should see the permissions for your files.
-
- Posts: 8
- Joined: Mon Sep 17, 2007 3:31 am
- Location: Germany
- Contact:
Is it possible, to add the link I posted, in the Steamcast (v0.9.75 beta) Admin Web Interface ?
Code: Select all
admin/?shutdown=y
sincerely yours, blueice_haller