Current Issue


Table of contents

CD-ROM

Sys Admin and The Perl Journal CD-ROM version 12.0

Version 12.0 delivers every issue of Sys Admin from 1992 through 2006 and every
issue of The Perl Journal from 1996-2002 in one convenient CD-ROM!

Order now!

Sys Admin Magazine > Archives > 2007 > June 2007

Listing 1 stop_cron

#!/bin/sh
# Listing 1: stop_cron

. /etc/setenv_path

users=$@

if [ -z "$users" ]
then
    while read user
    do
        users="$users $user"
    done
fi

CRON_ALLOW=/etc/cron.d/cron.allow
SORTINGHAT_DIR=/opt/SortingHat

for user in $users
do
    if grep -w $user $CRON_ALLOW
    then
        echo "Stopping ${user}'s cron..."
        file=/var/spool/cron/crontabs/$user
        if [ -f $file ]
        then
            $SORTINGHAT_DIR/bin/SortingHat -b $file
        fi
        crontab -r $user
        echo "${user}'s cron has been stopped."
    else
        echo "$user is not in $CRON_ALLOW"
    fi
done



MarketPlace

Flowcharts from C/C++ code -- Free trial download
Understand C/C++ code in less time. A new team member ? Inherited legacy code ? Get up to speed faster with Crystal Flow for C/C++. Code-formatting improves readability. Flowcharts are integrated with code browser. Export flowcharts to Visio.

Automate Software Builds with Visual Build Pro
Easily create an automated, repeatable process for building and deploying software.

WinDev 12 - Powerful IDE
Develop 10 times faster ! ALM, IDE, .Net, RAD, 5GL, Database, 5GL, 64-bit, etc. Free Express version

Web based bug tracking - AdminiTrack.com
AdminiTrack offers an effective web-based bug tracking system designed for professional software development teams.

Wanna see your ad here?