source: LATMOS-Accounts/etc/la-sync-manager @ 580

Last change on this file since 580 was 580, checked in by nanardon, 15 years ago
  • reload from initscript call daemon to perform sync
  • Property svn:executable set to *
File size: 859 bytes
Line 
1#!/bin/sh
2#
3# la-sync-manager startup script
4#
5# chkconfig: 345 97 3
6# description: Manage synchronisation between latmos-account bases
7
8. /etc/rc.d/init.d/functions
9[ -r /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
10export LC_ALL
11export LANG
12
13USER=apache
14
15RETVAL=0
16prog=la-sync-manager
17
18function start () {
19    gprintf "Starting %s: " "$prog"
20    daemon --user $USER /usr/bin/la-sync-manager
21    [ $? -eq 0 ] && success || failure
22    touch /var/lock/subsys/$prog
23    echo
24}
25
26function stop () {
27    gprintf "Stopping %s: " "$prog"
28    killproc la-sync-manager
29    rm -f /var/lock/subsys/$prog
30    echo
31}
32
33case "$1" in
34    start)
35        start
36        ;;
37    stop)
38        stop
39        ;;
40    status)
41        status la-sync-manager
42        ;;
43    restart)
44        stop
45        start
46        ;;
47    reload)
48        la-sync -b
49        ;;
50    *)
51        gprintf "Usage: $0 {start|stop|status|restart|reload}\n"
52        exit 1
53esac
54
55exit $RETVAL
Note: See TracBrowser for help on using the repository browser.