Category Archives: Shell scripts

Adding Git version control to web sites

0.00 avg. rating (0% score) - 0 votes

Here’s a little script I made to make it easy to put a number of existing web sites residing under /var/www under version control by Git. Regarding security, it is obviously not a good idea to initialize the Git repository directly under the site directory, since from there it might be served by the web server to the outside world. And that is not what I want. Instead what I want is to have the Git working directory directly in the site directory that is served, and the repository somewhere else. That is perfectly possible with Git, just by setting one or two environment variables. Continue reading Adding Git version control to web sites

Init Script for Daemonizing Non-Forking Processes

5.00 avg. rating (95% score) - 1 vote

Sometimes you have an executable which does not fork to the background, but you need to control it with init scripts, so that it does indeed run in the background. Here’s a pretty generic init script for that. It allows you to configure these:

Continue reading Init Script for Daemonizing Non-Forking Processes

SUID script requirements on AIX 5L and ksh93

0.00 avg. rating (0% score) - 0 votes

Requirements for a suid script include:

  • #! directing the KornShell be used
  • Executable by user, group, and other
  • No read permission
  • Add suid permission by chmod u+s on the file

Add a -p option to #! to increase security to force a separate process if one is not normally done.

Example:

Source of this information:

http://www.ibm.com/developerworks/aix/library/au-kornshell93.html#n

Updated version of the flash64.sh script for Ubuntu 7.10 Gutsy Gibbon

0.00 avg. rating (0% score) - 0 votes

A few months ago I released a script to install a 32-bit Adobe Flash plugin to a 64-bit Firefox, but it doesn’t seem to work in Gutsy beta. Here’s an updated one. I upgraded my laptop to Gutsy and used this one to get Flash working.

Edit: I did a complete reinstall later and learned that Gutsy knows how to set this up by itself. So there’s no need for this script anymore. And that is a very positive thing!

Continue reading Updated version of the flash64.sh script for Ubuntu 7.10 Gutsy Gibbon

Starting and stopping IBM Websphere MQ on a Redhat Enterprise Linux box

2.00 avg. rating (65% score) - 1 vote

Here’s a little script I made for starting and stopping Websphere MQ on a RHEL 4. It is useful for a simple configuration with one Queue Manager and listener. Just put your queue manager name in the QMGR variable and the listener port to the PORT variable, and save the script to your /etc/init.d.

Continue reading Starting and stopping IBM Websphere MQ on a Redhat Enterprise Linux box