CentOS 5 :: Run Shell Script At System Startup?
Apr 28, 2011
I use CentOS 5.5 and I've trouble in run shell script after system reboot. That script runs jboss server and it looks that way:
#!/bin/sh
rm -R -f /opt/billing/jboss-6.0.0.M1/server/default/tmp/
rm -R -f /opt/billing/jboss-6.0.0.M1/server/default/work/
/opt/billing/jboss-6.0.0.M1/bin/run.sh -c default -b 0.0.0.0 -C /opt/billing/jboss-6.0.0.M1/server/default/lib/ > /dev/null &
I've created user account for jboss.
privileges of above script are okay. I've tried so far:
- add command to /etc/rc.local
- add script to /etc/rc3.d/ and create symbolic link to it in /etc/init.d/
- add run script by @reboot annotation in crontab (crond automatically starts with OS)
and jboss still sleeps after reboot. I've noticed that commands which remove directories seem to work when I've added them explictly to /etc/rc.local. But next command which runs jboss hasn't been executed.
View 4 Replies
ADVERTISEMENT
Feb 18, 2010
server is :intel 5000p ,2gX4 ram ,cpu 5405 X13 sata sda 500g sata use for system rootfilesystem primate mastersdb 500g sata use for data filesystem second mastersdc 500g sata use for data filesystem second slavebios set use enhance and ide i install centos5.4 x86_64 on sda when i install system on sda, sdb and sdc is offline.after system install sucess ,poweroff and add sdb and sdc when system kernel start report ata0 error or ata1 error. exp XXXX (rydy).but when only add sdb or sdc ,system can startup and use all service ,exp vncserver ,kvm,pptp..
View 2 Replies
View Related
Jul 29, 2009
In bash shell how to run shell script during startup
View 2 Replies
View Related
Nov 20, 2010
I need to run a shell to enable pseudo-multitouch on my touchpad using a shell which automatically configs synclient.I put this file under /home/<username>/, and also put this to the Session manager under system menu. But it doesn't work. I've already used chmod command to make sure that the file is executable.
View 9 Replies
View Related
Mar 31, 2010
I have create a script to start a server(my first question). Now I want it to run on the system boot and start the defined server. What should I do to get this done? My findings tell me put this file in /etc/init.d location and it will execute when the system will boot. But I am not able to understand how the first argument on the startup will be start? Is this predefined somewhere to use start as $1? If I want to have a case startall that will start all the servers in the script, then what are the options I can manage.
My Script is like this:
#!/bin/bash
case "$1" in
start)
start
[code]....
View 2 Replies
View Related
Apr 18, 2010
I'm looking to make a launching script which launches a program in one of the current directories that the user has open, the problem is I have no idea how to get info about all of the terminals open.I simply want to check which directories the user has open and do a pwd on the terminals, and then use that to cd into the dir before launching. I might be able to use a combo of who,tty, top, and pwd...but I don't know where to go.
View 7 Replies
View Related
May 6, 2011
I wrote a script, and what to make it surring with ububtu as startup shell.
View 9 Replies
View Related
Aug 4, 2010
I am running Linux Mint 9..I play xbox live and run it through my laptops wireless network connection so i dont have to pay 100 dollars for the usb wireless adapter for the xbox. In windows 7 this is easy to configure so that when i turn my laptop on and then xbox it automatically connects.
View 10 Replies
View Related
Mar 18, 2010
using any sort of rxvt-based terminal with TERM set to rxvt (or rxvt-unicode) then ^L will not clear the screen, only act as newline. This is not the behavior I see on Debian or CentOS. I have the same user environment at each site. Using urxvt on centos, ^L will clear the screen like readline(3) says it should. If I then ssh to slackware, it won't. exporting TERM=xterm will cause the correct behavior after having logged in to slackware, but I'd rather understand why this is happening. I've tried moving aside all the shell startup scripts, setting clear-screen explicitly in .inputrc, setting stty sane nothing doing. Am I missing something?
View 10 Replies
View Related
May 5, 2011
what shell command I should look into that will "mount" a printer that is present in lsusb output, but not present in /dev/usb/? I have a working printer connected with a Parallel to USB printer cable, but after I reboot the machine the printer is not "mounted" (for lack of the correct term?) at /dev/usb/lp0 until I unplug the USB cable and plug it back in lsusb sees it always though.
View 1 Replies
View Related
May 31, 2011
I'm looking for a specific command,if it exist... i want to login from my server to another Linux server,but the question is: can i do it in a one line command for ex:
usually you type: ssh "user"@10.1.1.1 and then the password,but I'm looking for a command in one line a fake ex: ssh user@10.1.1.1 -p "password" something like that.
I don't know if anyone of you understand what do i want to say .
View 6 Replies
View Related
Dec 23, 2009
I booted up the computer (Fedora 11) and it hung at the blue screen with the F bubble in the middle. I waited for quite sometime without any change to the system I held down the power button to power off and tried starting the computer again with the same result.
When the sytem reboots and I press alt+ctrl+2 i see messages like below on the black screen:Unknown username "root" in message bus configuration file.Could not get password database....Failed to start message bus: Could not get UID and GID for username "dbus"..Please help me get the system up. I saved some data and did not take a backup. Is there's a way I can restore my system to a previous date? Or backup my data somehow?
View 2 Replies
View Related
Apr 26, 2011
VLC media player hangs OS when starting, presumably as it loads a new video file (.mp4 in my case). It doesn't happen every time, but after a few days it eventually freezes the system requiring a reset. Google shows many complaints on this, but no fix. Is there a solution?
View 1 Replies
View Related
Jul 30, 2009
ive created user in my server for vsftp and they are chroot when they use the ftp but not when they use the shell. How to chroot them into the shell?
View 3 Replies
View Related
Nov 24, 2009
I cannot get the following shell script to run. It is required for an installation of an Intel compiler (i.e. I did not write the script). I have had no trouble running other scripts but I cannot see what I am doing wrong with this one:
#! /bin/sh
export MKLROOT="/opt/intel/Compiler/11.1/059/mkl"
if [ -z "${INCLUDE}" ]
then
[Code]....
In a terminal I cd to the folder where the above script (mklvarsem64t.sh) resides and type that script name. Nothing happens and when I echo one of the environment variables (e.g. echo $LD_LIBRARY_PATH) I do not get what it is supposed to be (it remains as it was before running the script).
View 1 Replies
View Related
Jan 5, 2011
not have shell in VNC session ,
on a clean install of centos put these command
yum update -y
yum groupinstall -y "Japanese Support"
yum install -y rtorrent lftp mc firefox
yum -y groupinstall xfce
[Code]....
View 4 Replies
View Related
Mar 5, 2010
I'm having a problem with GDM very similar to the one described in the thread below, though they did not find a solution.
[URL]
Basically when I boot the machine I first see the terminal login, then after a moment I get what looks like some graphical corruption followed by GDM appearing.
I've already attempted reinstalling GNOME and X, then manually reinstalling GDM, but none have solved the problem. I'm currently in the process of enabling boot logging as described in the thread, so I'll post that soon.
View 11 Replies
View Related
Aug 11, 2010
I have CentOS 5.5 with no GUI. How do I enable commands/scripts to run on startup when the server is rebooted?
View 2 Replies
View Related
Apr 8, 2011
I've run into this problem this week. The other night a power supply failed on a different system and appears to have surged the UPS which it and some other computers were plugged in to. One computer was fine, but the RAID server that is used for backups ended up with a bad disk and this "Disabling IRQ #169" message now shows up during boot, right after starting udev and setting the hostname. The system then sits there for 3-5 minutes before repeating a scroll of "/etc/rc.d/rc.sysinit: line 966: /bin/usleep: Input/output error"
I have booted with linux recovery from the CentOS DVD in order to replace the drive that was damaged. I rebuilt the raid array and all the data seems to be fine. There is another message though after "Red Hat nash version 5.1....." no raid disks and with names: "isw_bf jihdchhi_Hostname" failed to stat() /dev/mapper/isw_bf jihdchhi_Hostname
I was considering doing a complete reinstall of CentOS but if there is another solution I would much appreciate it, is it perhaps an issue with Grub not being able to find the updated array? As it is, it is impossible to boot the system except for using a live CD to do it.
View 12 Replies
View Related
Jun 4, 2011
I have placed a script I would like to run on starup in /etc/init.d and created symbolic links to that file in /etc/rc3.d and /etc/rc5.d but it doesn't run on startup.Is there something else I need to do to get this to work?
View 13 Replies
View Related
Jun 21, 2010
I'm writing a shell script to check the I/O activity of a Linux box and if the server is quiet for a certain long time, the script should let the server go to sleep. But, after some Google searching, I didn't find a answer yet. Is there a shell script command to put a Linux box to sleep?
View 3 Replies
View Related
Dec 28, 2010
I was using UBUNTU and still do, but I dual boot UBUNTU/Slackware now and my Linux knowledge has increased so much. This forum has been right there with me for the last couple weeks and I was reticent to post a question until a knew I had exhausted the available sources. So here goes.....Can I change the font size of the system shell that begins at startup (with the boot info and stuff). I really like using this shell as user. The thing that would make me nuts for it is if I can make the text a bit smaller. I have a 1920x1200 display and could really take advantage of all of that "real estate." The other posts related to this seem to focus an a broken configuration from the beginning, but my install is SWEET. Can I change this or is it baked into the system?
View 11 Replies
View Related
Jan 26, 2010
I am setting up a system for students to use to run lab-based exams. On bootup, the system needs to download an encrypted file containing the exam files, and then ask for a decryption password.
I want to do this during system startup (before anyone logs in). But I am having trouble getting keyboard input at this point.
I've put a script in /etc/rc.d/rc5.d/S99examsetup along the following lines:
Code:
#!/bin/bash
echo -n "Enter password:"
read EXAMPW
echo "You gave me: $EXAMPW"
but it doesn't respond to keyboard input. I have tried appending "< /dev/console" but this also doesn't work; in fact if I insert 'tty' before the first 'echo', it tells me that /dev/console is the tty being used for input anyway.
Is there a way round this? I can use plymouth ask-for-password, but that doesn't seem very portable, and it interacts badly with the graphics driver on one of my machines.
View 4 Replies
View Related
Jul 9, 2011
I am currently in place where I get high speed internet connection. I am using F15 64 bit version. I've installed a lot of softwares and updated theOS completely. My question is is there any way that I can create a startup disk of my system so that I can install it in other system of same configuration.
View 1 Replies
View Related
Feb 9, 2011
I know to start emacs with no window system, I do:
emacs -nw filename.txt
But, I don't want to specify -nw constantly. What do I add in my .emacs to do this automatically?
View 3 Replies
View Related
Sep 16, 2011
I'm running a ubuntu 10.04 box.
I want to enable Mysql on startup.
Typically, I used the following command:
Mysql still doesn't start when system boots.
View 1 Replies
View Related
May 13, 2010
I wanna get the startup sound Backtrack plays when logging in . Anyone can show me how to change the system startup sound and where I may be able to download that startup sound from?
View 2 Replies
View Related
Oct 28, 2010
I need to start vboxwebsrv and x11vnc on startup with a specific username.I tried entering the commands in rc.local as:/bin/su -c "/x11vnc -forever -usepw -httpdir /usr/share/vnc-java/ -httpport 5800" user1/bin/su -c "/usr/bin/vboxwebsrv -b" user2.But this does not start the app on startup.
View 2 Replies
View Related
Feb 1, 2011
I just needed some help with running the bash shell. I think I might have accidentally corrupted a file when I was looking through the /bin dir. Anyways, whenever I login to my server via SSH I get the following output:
View 1 Replies
View Related
Jul 12, 2011
I put one script in /etc/init.d/abc.sh. Now I want it to run at startup.
How can I do that with chkconfig?
chkconfig --add abc.sh
But I am not sure how it works.
View 2 Replies
View Related