source: trunk/server/common/oursrc/accountadm/cronload @ 2717

Last change on this file since 2717 was 2313, checked in by ezyang, 12 years ago
More robust error handling for cronload, by btidor.
  • Property svn:executable set to *
File size: 300 bytes
Line 
1#!/bin/sh
2
3if [ -z "$1" ]; then
4  echo "ERROR: please specify a crontab file" >&2
5  exit 1
6fi
7
8if [ -n "$2" ]; then
9  cd "$2"
10fi
11
12if [ ! -f "$1" ]; then
13  echo "ERROR: file does not exist" >&2
14  exit 1
15fi
16
17/bin/cat "$1" | /usr/bin/crontab -
18
19echo "New crontab for $USER:"
20echo ""
21/usr/bin/crontab -l
Note: See TracBrowser for help on using the repository browser.