]> andersk Git - moira.git/commitdiff
service script for RT to set permissions on the generated file, and
authorzacheiss <zacheiss>
Thu, 25 Oct 2007 14:47:54 +0000 (14:47 +0000)
committerzacheiss <zacheiss>
Thu, 25 Oct 2007 14:47:54 +0000 (14:47 +0000)
Makefile glue to install it.

gen/Makefile.in
gen/rt.sh [new file with mode: 0755]

index b24ed0a06324b0860f573cbc634d10d4b65718c6..395ac93c50a9ec42cfa424d8b6fe365a34ca9da6 100644 (file)
@@ -44,11 +44,12 @@ TARGET=     acl.gen boot.gen dhcp.gen directory.gen events.gen hesiod.gen hosts.gen
 
 SCRIPTS=access.gen access.sh acl.sh aliases.sh boot.sh ca.gen calendar.gen \
        confluence.gen dhcp.sh events.sh hesiod.sh ip-billing.gen \
-       ip-billing.sh ldap.gen longjobs.gen longjobs.sh mailhosts.gen mailhub.sh \
-       mailman.gen mailman.sh nagios-colo.gen nagios-colo.sh nagios-printers.gen \
-       nagios-printers.sh ndb.sh nfs.sh null.sh postoffice.sh print.sh sapprint.gen \
-       sapprint.sh spwatch.gen tsm.gen tsm.sh warehouse.gen warehouse.sh \
-       winstats.gen winstats.sh www.sh zephyr.sh install_dirs install_quotas zero_quotas
+       ip-billing.sh ldap.gen longjobs.gen longjobs.sh mailhosts.gen \
+       mailhub.sh mailman.gen mailman.sh nagios-colo.gen nagios-colo.sh \
+       nagios-printers.gen nagios-printers.sh ndb.sh nfs.sh null.sh \
+       postoffice.sh print.sh rt.sh sapprint.gen sapprint.sh spwatch.gen \
+       tsm.gen tsm.sh warehouse.gen warehouse.sh winstats.gen winstats.sh \
+       www.sh zephyr.sh install_dirs install_quotas zero_quotas
 
 .SUFFIXES: .pc .gen
 
diff --git a/gen/rt.sh b/gen/rt.sh
new file mode 100755 (executable)
index 0000000..4536303
--- /dev/null
+++ b/gen/rt.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+# $Id$
+
+if [ -d /var/athena ] && [ -w /var/athena ]; then 
+    exec >/var/athena/moira_update.log 2>&1
+else 
+    exec >/tmp/moira_update.log 2>&1
+fi
+
+# The following exit codes are defined and MUST BE CONSISTENT with the
+# error codes the library uses:
+MR_MISSINGFILE=47836473
+
+PATH=/bin
+OUTFILE=/usr/local/rtadmin/work/moira.out
+
+# Alert if the output file doesn't exist
+test -r $OUTFILE || exit $MR_MISSINGFILE
+
+# Set the perms usefully
+chown root $OUTFILE
+chgrp 0 $OUTFILE
+chmod 644 $OUTFILE
+
+# cleanup
+test -f $0 && rm -f $0
+
+exit 0
This page took 0.041359 seconds and 5 git commands to generate.