Archive for the 'Linux @en' Category

Set JAVA_HOME on *nix

Carl on jun 8th 2012

If you have installed java (JRE/SDK), and you need for certain programs the system variable JAVA_HOME, you can initialyse it yourself.
Go to you home directory. Find your java install directory: which java
Edit .bashrc/.bash_profile (depends on your *nix flavour) and add:
export JAVA_HOME=[value from which java]
run:
source .bashrc/.bash_profile

READY!!!

You can check it with echo $JAVA_HOME

Filed in Linux @en | Reacties uitgeschakeld

Amavisd-new init script problem

Carl on jan 4th 2012

Recently I had to reinstall my mailserver, due to the usual f…-up one tends to make as root. After several hours of configuring packages (debian testing) I finally had it up and running. Unfortunately, one of my cronjobs failed. An error restarting amavis after the update of spamassassin. Luckilly, someone already had the solution for the failing init-script.
If you get the following error restarting/stopping amavis:

Stopping amavisd: (not running).
Starting amavisd: The amavisd daemon is already running, PID: [10966] (failed).

Check your /etc/init.d/amavis for the following line:
STOP="--stop --quiet --pidfile $PIDFILE --name ${DAEMONNAME}"
Comment it out like:
# STOP="--stop --quiet --pidfile $PIDFILE --name ${DAEMONNAME}"
and put the next line in:
STOP="--stop --quiet --pidfile $PIDFILE"

Short and sweet: your system is probably running amavisd-new as user amavis or amavisd instead of amavisd-new, as defined in the top of the file. What’s in a DAEMONNAME …
If that doesn’t work … you’ll be in for a nice google-session

Filed in Mail server | Reacties uitgeschakeld