Ubuntu :: Make A Startup Script That Executes A Simple Php Script At Boot?
Mar 24, 2011
trying to make a startup script that executes a simple php script at boot. The stipulation is that it must be run after fstab is processed because it requires access to a volume that fstab mounts. As it is, it doesn't seem to be running properly at startup, and I suspect that it is simply running before the volume is mounted. The script does not need root access. If I run it once I login, it works fine.
Also, is there a way to determine the output of a startup script?I am have configured a bash script called module.sh that cd's to the scripts directory (in the external volume) and then executes the script. I didn't forget the ampersand after the php invocation. I used update-rc.d module.sh defaults to configure it.
make a start up script so that it executes this command: cat /proc/acpi/battery/BAT1/state I managed to execute it writing command to .bashrc, but every time I open terminal it starts like this:
[Code].....
I need this command on start up, so that my battery meter starts working properly. For some reason, if the command is not activated, gnome battery meter is showing that battery is charging even if I am not on AC power. If there is any other way to fix this without making script I would be glad to hear.
I would like to a build a CD image (of CentOS 5, x86_64 that loads into memory and boots to the OS without installing anything to hard drives. Then I would like the system to execute a shell script automatically. The shell script will have commands that will control execution.
The goal of this exercise is basically to pre-configure a system (RAID config, BIOS update, etc) automatically using the shell script before installing the OS. I would like the ability to change the shell script as needed and probably repackage the ISO image. I would prefer not to deal with building a source tree to accomplish this. this is something one could do using mkisofs.
I'm having trouble getting conky to boot friendly-like with the gwm. If I just set conky as a start up program, it floats above other windows, it seems to have loaded before the desktop actually did. So I googled it and found that many people use the conky shell scripts to make it sleep until the desktop load. I created one, made it executable, and restarted to see the effect and found that conky never launched at all (not visible, no running process).
Here is my startup shell script for conky: Code: #!/bin/bash sleep 10 && conky;
This is how it should look if working properly. If I launch conky after login, it looks like this every time. [URL]. This is how it looks if I simply set it to open upon startup with no script. [URL]. If I try to open it with the script, I simply never see anything in conkys place. It seems like the script never executes. I've tried setting longer and shorter sleep times, but I never see so much as a single instance of conky running.
even though this is a simple task I always have problems to do this.I want to execute the following#!/bin/bashjava -jar JabRef-2.6.jaror in other words this is the command I use in konsole to make the application to launch.Then usully I try to create a desktop in the icon either by using a. create link to locationorb. create link to application.where I select as file the file myfile.sh that contains the two lines of code I posted above (see again below) "#!/bin/bashjava -jar JabRef-2.6.jar"I do this file executable by using the chmod +x.Sometimes I think this works while others like now I only receive the cursor bouncing for sometime before it dissapears
In Ubuntu 10.10 I want to have a shell script execute on bootup after everything else is done, *just* before the computer gets to and sits at the login screen. I find this easy in CentOS/Red Hat. If I place my scripts in /etc/inittab near the end, right after the mingettys, that is PERFECT. But Ubuntu has no /etc/inittab and I have spent the past few days going over and over and OVER more info about Upstart and the rcX scripts and I can't seem to get it. Anything I place in an rcX script runs too late, only after the machine is past the login screen i.e. a human must log in first. And I would rather not have to enable auto-login. I've heard that Ubuntu will honor an /etc/inittab file if you create one, and it does, but that too runs too late, only after a human has logged in. Can anyone tell me where a script should be placed in Ubuntu to execute after all system initialization is done, but before human interaction is required?
Me and my mom are sharing a laptop.My mom likes to use Google Chrome. I like to use Opera. Is there any way I can tell the system to start the Opera application , but then instantly minimize it to the tray bar? I want that because : if my mom starts the computer and I'm not around , I still want all the tabs in my Opera to load , without my mom knowing anything about my "malefic" plan ...
How would i make ubuntu just execute this Code: deluged -p 10002 -c ~/delugebig/ at startup? Just print it as if i myself would print it in the termial.
The problem Im facing is that I cant seem to intercept the data going between the client and the server. I want to be able to have the data coming to the server in a variable, manipulate it and send it to the client, and the other way, have the data coming to the client in a variable, manipulate it and send it to the server.
Im running on an embedded device where tee, awk and many other commands are absent. how can I redirect the data to a variable, manipulate it and pass it to the other side, that is the question.
I try to play a simple movie in avi format. The codec is called AC-3. I tried several tutorials, now i stuck with a "local file conflict between packages" when i run the auto install with movie player. I try now VLC Player ... With VLC it works! Open from the Administrator panel - Add or Remove Software than search for VLC and tick the main stuff and install.
I'm trying to make an extremely simple script named 'findm' in my /usr/local/bin that looks like this:
Code: #!/bin/bash find -mindepth 1 -iname '*$1*'
As you can see, I want to be able to run 'findm some_argument' while in a shell in any directory. The problem I'm having is that this script only works when I'm in my top most home directory. Any directory lower than that and the script returns no results.
First off, I'm completely new to bash scripting so forgive me if I make any egregious errors. I'm trying to make pop-up reminders for the simple calendar program when. This is what I have so far:
Code: #!/bin/bash # set the time format for when #current="$(date +%I:%M %p)" current="$(date +%-l%p)" today=~/.when/today
[Code]....
When I run the script, gxmessage pops up and displays the correct information, but it does so for each line in "~/.when/today" that contains a time that matches the current system time (which would be three pop-ups at 10PM, according to the example). I want it to display the information only once. How can this be accomplished? Is a while loop even the right job for this?
I would like to unzip a simple PHP code files, to have a online PHP contact / phone book. Simply, slow, and not database oriented over complicated setups into settings. I have a PHP / web provider (free), not apache. WITHOUT SQL (like before it may exists) something like this [URL]
i'm a college student studying pc programing, and i was given today a special work and i have to program using miranda... which i've never used it >.< can anyone give me a hand to where to download, how to compile, and a simple tutorial for making a simple program or something?
I edited some file in /etc and it stopped loading, but after upgrading to natty it loads again. I'm already starting X manually from /etc/event.d/tty7, but the X started from gdm is the one I see on the screen. I don't have a keyboard, so I can't switch to the console with the right X after startup. Is the only option to deinstall gdm, or is there a way to make it not start?
I am trying to make an application server that would contain simple ones like edit, openoffice, gimp, so on and so forth. I know how to access these using ssh but what I want is that the application runs on that server as it already does, but to open local files and save them locally.
I run Ubuntu 10.04. For some reason, MySQL won't start on startup. How do I make it run on startup? I installed it by installing LAMP using tasksel and did everything according to: [URL]. Also, I have another problem: When I try to start/stop/restart mysql in the terminal, the terminal will not give me any prompts after entering the command. E.g., after entering "sudo service mysql start", nothing will happen. Even after waiting for 30min, nothing happens.
I would like to put my ubuntu system (the one on my partition) in a usb drive, so that way I can take it everywhere I go. The reason for this is because all of the programs I have and the configuration I currently have in my ubuntu (I should say "macbuntu"). That is:
burg boot loader (I probably don't need this one!) x system plymouth theme || also windows 7 original plymouth theme mac4lin 1.0 aqua GTK theme and emerald theme mac ultimate icon theme mac4lin 1.0 cursor theme (working even with compiz) gnome global menu compiz packagers ppawith all the extra stuff telepathy ppa for empathy, having all the extra stuff working also win2-7-pack_v-9.1 And lots more stuff!
I don't want my personal documents though (text docs, music, videos, pics 'maybe few pics'), just configuration files and programs. Can this even be possible?...
I'm trying to find a way to auto-mount a couple of NTFS volumes at login (or even earlier if possible), not by editingfstab or running the (currently buggy for Maverick) ntfs-config tool, but by simulating the way that Nautilus mounts volumes when you click or double click on one. The reasons for this are not important(just to make things a little mysterious).So, I checked the output of syslog when I click on an unmounted volume in Nautilus. It seems very useful, but I can't make much out of it. So I need your help I need to make something like a script to do this thing at startup.
Code: Feb 16 20:52:28 UBUNTU-BCM-P5Q-DELUXE ntfs-3g[3701]: Version 2010.8.8 external FUSE 28 Feb 16 20:52:28 UBUNTU-BCM-P5Q-DELUXE ntfs-3g[3701]: Mounted /dev/sdb1 (Read-Write, label
Is there a command that can tell me which binary actually executes for some program name? "whereis" seems to do something different.
Specifically, I am trying to hunt down and kill a python 2.6 installation that just won't die.
whereis just seems to be returning anything with "python" in its name, but I want to know which binary thinks it is python 2.6.5. (By the way, I've tried all the above manually, and it isn't any of them)
I have enjoyed setting up a live USB stick to boot Ubuntu from and it works very well but I can't make my settings persistent. The option to do that in Startup Disk Creator is greyed out, the Stored in Reserved Extra Space is just not available.
I have Ubuntu 10.04 LTS installed on my HP Compaq Presario CQ60. Unfortunately the screen is busted & I'm using an external LCD. It boots directly onto the LCD, but the resolution is 800x600 by default, the only other option is 640x480. I'm assuming its using the VESA drivers for the graphics. I've managed to temporarily fix the resolution to 1024x768 by running the following in terminal for every session:
[code]...
I've added a document to /etc/init.d so that it may be loaded on startup, but it does not seem to work.
I have recently installed Lubuntu 11.04 on an old system. the problem is that it hangs at startup when tries to "Starting Bluetooth". I have searched through this forum and the web and it seems that the problem has something to do with my TV Card. But I can't remove the card because it is a part of my Graphic Card which is an "ATI Radeon 8500DV All In Wonder". I can start the machine with Lubuntu Live CD, and so I thought that maybe I can change a value in a file from installed Lubuntu through Live session that makes the Bluetooth Service disabled at startup.