I have a small Python-based server program that runs fine, but I want launched each time the server is rebooted. What is the least that I need to put into an /etc/init.d script to work? I only care about "stop" and "start" (and thus probably the trivial "restart").
Paul Hoffman's questions
Is there a way to get all of BIND's startup messages to go into the log named in the config file? For example, in named.conf, I have:
logging {
channel qlog {
file "/etc/bind/named.log";
severity debug 2;
print-time yes;
print-severity yes;
print-category yes;
};
category default { qlog; };
};
The "default" category is supposed to get all of the logging that doesn't happen in other categories. However, when I start named, I get a bunch of messages in /var/log/daemon.log, and then more in the named file. I would like them all to go into the named file so I don't have to look two places to figure out what might have gone wrong when starting.
I need to set up an ESXi 5.1 box to run some pre-made VMs that will not run well under VMware Workstation. I have started testing this, but cannot figure out where the @#$% the control comes from other than vSphere Client, which runs only on Windows. I get strong hints that, at least under earlier versions of ESXi, you could do most of the necessary things (start and stop VMs, add files to the datastore, configure new VMs, and so on) from a command line. However, VMware's site is now so littered with related products, it is impossible to find whether this low-end scenario is supported.
I would imagine that a lot of serverfaulters would rather not have some of their critical infrastucture running on Windows. Let us set up a hypervisor box, and we'll control it from SSH. If there is a guide for how to do this for ESXi 5.1, I'm not finding it. Clues appreciated.
I have a couple of VMs that cannot have guest additions installed, and I pause and resume them with days between. I normally forget to nudge NTP when I start up the VM. Is there a good way to tell ntp to be very aggressive in how often it should check for changes?
I have a specific use case where I would really like to be able to change a user's password with a single command with no interactivity. This is being done in a safe fashion (over SSH, and on a system with only one user able to be logged in), so it's fine to expose the new password (and even the old one, if necessary) on the command line. FWIW, it's a Ubuntu system.
I just want to avoid having to add something Expect-like to this system for just this one task.
In Ubuntu, I have two ethernet interfaces eth1 and eth3 that I want to call "foo0" and "foo1", respectively. Basically, I want something like "ip link alias DEVICE SECONDNAME". Is there a way to do this without mucking in the kernel?
I would like to automate the installation of FreeBSD 8.2 for a project I'm working on. I know the answer to every question in the standard installation, so even a script that just pushes keystrokes would be acceptable. All clues appreciated.
FWIW, I tried this question on the FreeBSD fora (http://forums.freebsd.org/showthread.php?t=23906) but only got one response that didn't solve the problem. Maybe ServerFaulters will have more ideas.
I need to make a quick-and-dirty NAT out of a Ubuntu 10.10 box. Just "this side is NATted with DHCP handing out 192.168.x.0/24" and "this side gateways to the Internet", and nothing else interesting. There seems to be many choices with varying degrees of documentation. What's the easiest way to do this?
When booting into Linux, there are sometimes one or two lines that get quickly cleared. I think that some of them don't even appear in dmesg. If nothing else, I want to suppress the clear before the "login:" prompt. Is there a kernel command or sysctl that I can set to prevent this so I can read them on the console screen after booting?
In a lab setup, I want eth0 on a Ubuntu server box to get a DHCP address for talking to the outside world, and I also want to assign it a static 10.x.y.z address for talking to other boxes on the local network that have 10.x.y.z addresses. I want to do this by editing /etc/network/interfaces.
The man page for /etc/network/interfaces is modeled after "here's a bunch of examples, I hope you can figure out the actual rules on your own". I don't see a way to give one interface two addresses using two different methods (static and dhcp), and initial fumbling didn't produce useful results.
I am creating a test system that will be run by others. It will have some kernel mods, and some of the default software in /usr/bin will be replaced. Because of this, I want to prevent the users from doing "sudo apt-get update" or "sudo apt-get install". These systems will not have any valuable data, and will mostly be behind corporate firewalls, and thus it is safe to completely punt on security-based releases.
FWIW, moving apt-* and dpkg* to /usr/dontusethese does not work because some other processes like (gag) MOTD updating relies on them being in /usr/bin and whine if they are not there.
On Ubuntu 10.04, I have a long Python program that prints a bunch of output; I run this under "nohup". However, it waits until the end to put all the text in nohup.out. When I run similar programs under FreeBSD, each line gets sent to nohup.out. Is there a Ubuntu setting I can set to get the output faster?
I am about do move a server from one Ubuntu box to another. I'm not cloning the old box to the new; I'm creating a new system and will move data as needed. I want to install all the software that I have on the old box on the new one.
Is there a simple way to find the history of all the "sudo apt-get install" commands I have given over time? That is, dpkg -l shows me all the packages that have been installed, but not which top-level package installed them. If there is a way for dpkg to give me the installing package, I can find the unique ones there; otherwise, I want something else to say "you installed these 24 packages".
There are many threads here weighing the various merits of Apache and lighttpd. However, no one has talked about tools for migrating from the former to the latter. Are there good tools for the task? I have a bunch of random .htaccess tweaks in directories around a site, I want to find them and make sure those are either converted cleanly or called out obviously for hand-massaging.
[[ Moved from Stackoverflow for content reasons ]]
There are many times you want to use a USB hard drive to move files between, for exmaple, Vista, XP, Unix, and MacOS. A drive is formatted with FAT32. Files are added and removed under MacOS and XP and Unix. When viewing the drive on Vista, some of the permissions are very messed up. It cannot access some files or directories. It says some are "shared" and thus can't be deleted, while others are unreadable because they are owned by different users. Everything looks fine on the other OSs.
What is the easiest way under Vista to say "look, just make everything on this drive readable and deletable, OK?". This is a Vista system with just one user.