Category Archives: Linux

Linux – Re-sign an rpm package

Working on the Puppet manifest to install the newrelic-sysmond package to all the nodes. I want to host the newrelic-sysmond.rpm on the company repository server but in that case the i have to re-sign the rpm.

What i need to do is to download the rpm from the New Relic repository, move it to the RPM build server and run the following command.

  • rpm --resign newrelic-sysmond-1.3.1.437-1.x86_64.rpm

 

You will be prompted to enter the passphrase and that’s it.

Done =)

Reference: Maximum RPM – Signing Packages

Linux – Wait until a specific pattern is written on log using tail and sed

In the Ant build.xml, i need to make sure the JBoss server is started before running the test cases. There are 2 possible approaches.

  • Using twiddle.sh to check the status
  • Monitoring server.log until “Started in” is written on it

 

I took the 2nd approach. Here is an example output log when the JBoss server is started successfully.
Continue reading Linux – Wait until a specific pattern is written on log using tail and sed

Symblic links in FTP

Actually there is no way to use symbolic links in FTP. A workaround is to mount the folder with the bind option. For example, i have a jailed FTP account and i want to allow it to access the /tmp/eureka folder.

1. Create the mount point folder in the user home directory.

mkdir /home/<username>/eureka

 

2. Mount the /tmp/eureka folder with the bind option.

mount --bind /tmp/eureka /home/<username>/eureka

 

Done =)

Reference: vsFTPd and Symbolic Links