Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now

{XN}Boylett
Posted on: Dec 15 2008, 11:15 AM


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075


I did some googling.. apparently is because there isnt a /bin/sh so start.sh wont work. However, if I try starting server directly, it still doesnt work.

chroot /home/user /server

and server is a binary file

EDIT: I dont know if chroot is what I need.
I want the program to act as it's starting directory is its user's home directory, so it cant cd up but it can view all files in sub directories etc.
  Forum: Technical Support · Post Preview: #30777 · Replies: 7 · Views: 5,495

{XN}Boylett
Posted on: Dec 14 2008, 06:21 PM


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075


I get the same result.
  Forum: Technical Support · Post Preview: #30774 · Replies: 7 · Views: 5,495

{XN}Boylett
Posted on: Dec 14 2008, 10:50 AM


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075


Hi

Thanks for reply.

I tried using chroot, but it keeps telling me "No such file or directory"

chroot /home/user ./start.sh

and start.sh contains:
#!/bin/sh
nohup ./server &
  Forum: Technical Support · Post Preview: #30770 · Replies: 7 · Views: 5,495

{XN}Boylett
Posted on: Dec 14 2008, 05:34 AM


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075


Hi

I'm wondering, is there a way to run programs as 1 user, but not allow them to change directory and view directories higher than themselves?

So, for example:

I start a program in /home/blah
That program can access any files and folders in the /home/blah directory, however, it can't go up a directory.

Thanks.
  Forum: Technical Support · Post Preview: #30766 · Replies: 7 · Views: 5,495

{XN}Boylett
Posted on: Sep 16 2006, 03:01 AM


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075


with a cron and a shell script?
  Forum: Programming in Linux · Post Preview: #28038 · Replies: 26 · Views: 25,208

{XN}Boylett
Posted on: Sep 15 2006, 03:11 PM


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075


mellow.gif um ok ill have a fiddle with it. ill post the ^new^ code if it doesnt work.
  Forum: Programming in Linux · Post Preview: #28033 · Replies: 26 · Views: 25,208

{XN}Boylett
Posted on: Sep 14 2006, 02:24 PM


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075


I did. Now Ive just installed windows server 2003 and i found the terminal thing biggrin.gif
  Forum: Programming in Linux · Post Preview: #28019 · Replies: 26 · Views: 25,208

{XN}Boylett
Posted on: Sep 14 2006, 10:59 AM


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075


i have windows xp. how do i start it?
  Forum: Programming in Linux · Post Preview: #28014 · Replies: 26 · Views: 25,208

{XN}Boylett
Posted on: Sep 13 2006, 05:26 PM


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075


Whats a terminal window?
  Forum: Programming in Linux · Post Preview: #28007 · Replies: 26 · Views: 25,208

{XN}Boylett
Posted on: Sep 13 2006, 11:32 AM


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075


Sorry, what does that mean? I run Cron on my computer. The Crontab and sv_up.sh are both in the same file
  Forum: Programming in Linux · Post Preview: #28002 · Replies: 26 · Views: 25,208

{XN}Boylett
Posted on: Sep 11 2006, 01:55 PM


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075


oh well im happy it doing that every minute. anyway, about this shell script...
CODE
#!/bin/sh

mtasadir="/server_windows"
process=`ps auxw | grep linuxq3ded | grep -v grep | awk '{print $11}'`

if [ -z "$process" ]; then

  echo "Couldn't find MTA running, restarting it."
  cd "$mtasadir"
  nohup ./mtaserver +exec ffa.cfg &
  echo ""

fi

This code should start a program called mtaserver.exe, but it doesnt. cron runs it and it opens, but the server doesnt start. can anyone fix it?
  Forum: Programming in Linux · Post Preview: #27983 · Replies: 26 · Views: 25,208

{XN}Boylett
Posted on: Aug 30 2006, 02:15 PM


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075


QUOTE (michaelk @ Aug 29 2006, 10:53 PM) *
Try changing the line to
* * * * * /server/sv_up.sh >/dev/null 2>&1

This will run the script every minute.


thats works fine. also how do u turn cron off once started it? lol tongue.gif
  Forum: Programming in Linux · Post Preview: #27915 · Replies: 26 · Views: 25,208

{XN}Boylett
Posted on: Aug 29 2006, 03:31 PM


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075


Would it help if i said i get the error about 2 minutes after starting cron and in the cron.log ?
  Forum: Programming in Linux · Post Preview: #27907 · Replies: 26 · Views: 25,208

{XN}Boylett
Posted on: Aug 29 2006, 07:04 AM


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075


QUOTE (michaelk @ Aug 28 2006, 06:11 PM) *
*/2 * * * * /server/sv_up.sh >/dev/null 2>&1

Is this line 4?

Yes
  Forum: Programming in Linux · Post Preview: #27902 · Replies: 26 · Views: 25,208

{XN}Boylett
Posted on: Aug 28 2006, 11:41 AM


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075


QUOTE (michaelk @ Aug 28 2006, 03:44 PM) *
What is the error message?


CODE
28.08.2006 13:28 Cron started.
28.08.2006 13:29 Error in crontab, line 4: improper value.
  Forum: Programming in Linux · Post Preview: #27887 · Replies: 26 · Views: 25,208

{XN}Boylett
Posted on: Aug 28 2006, 07:33 AM


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075


CODE
# Restart server
*/2 * * * * /server/sv_up.sh >/dev/null 2>&1


Gets me an error message
  Forum: Programming in Linux · Post Preview: #27885 · Replies: 26 · Views: 25,208

{XN}Boylett
Posted on: Aug 28 2006, 06:42 AM


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075


QUOTE (michaelk @ Aug 28 2006, 12:21 PM) *
Does the script run successfully from the console?
0,2 * * ... means runs on 0 and 2 minutes or every hour not every 2 minutes. */2 means every two minutes.


does that mean */2 * * * * *
  Forum: Programming in Linux · Post Preview: #27884 · Replies: 26 · Views: 25,208

{XN}Boylett
Posted on: Aug 28 2006, 05:28 AM


Whats this Lie-nix Thing?
*

Group: Members
Posts: 18
Joined: 27-August 06
Member No.: 7,075


In the crontab:

CODE
# Restart server
0,2 * * * * /server/sv_up.sh >/dev/null 2>&1



In sv_up.sh:

CODE
#!/bin/sh

mtaserverdir="/server/"
process=`ps auxw | grep linuxq3ded | grep -v grep | awk '{print $11}'`

if [ -z "$process" ]; then

  echo "Couldn't find MTA Server running, restarting it."
  cd "$mtaserverdir"
  nohup ./mtaserver +exec ffa.cfg &
  echo ""

fi


What im trying to do is make sv_up.sh run every 2 minutes.
And what I want sv_up.sh to do is start mtaserver.exe if it isnt running
Can anyone help me? It doesnt work dry.gif
  Forum: Programming in Linux · Post Preview: #27882 · Replies: 26 · Views: 25,208


New Posts  New Replies
No New Posts  No New Replies
Hot topic  Hot Topic (New)
No new  Hot Topic (No New)
Poll  Poll (New)
No new votes  Poll (No New)
Closed  Locked Topic
Moved  Moved Topic
 

RSS Lo-Fi Version Time is now: 23rd November 2017 - 05:57 AM