Added client work scripts
[clearscm.git] / clients / HP / bin / setup_cron
1 #!/bin/bash
2 ################################################################################
3 #
4 # File:         setup_cron
5 # Description:  This script sets up Cygwin's cron on the local machine
6 # Author:       Andrew@DeFaria.com
7 # Created:      <date>
8 # Language:     Bash Shell
9 # Modifications:<modifications>
10 #
11 # (c) Copyright 2002, Andrew@DeFaria.com, all rights reserved
12 #
13 ################################################################################
14 me=$(basename $0)
15 # Make sure that certain directories and files do not exist! This is to let
16 # cron create them, which appears to be the only way to get these created
17 # correctly! 
18 if [ -d /var/cron ]; then
19   rm -rf /var/cron
20   rm -rf /var/run/cron.pid
21   rm -rf /var/log/cron.log
22
23   # Install cron service:
24   cygrunsrv -I cron -p /usr/sbin/cron -a -D -d "Cygwin cron" -e "MAILTO=$USER@broadcom.com" -e "CYGWIN=ntsec"
25 fi
26
27 # Start cron service
28 cygrunsrv -S cron