source: trunk/id-mapper/pmid2doi-updater @ 6

Last change on this file since 6 was 6, checked in by rob.hooft@…, 5 years ago

first cut at the pmid2doi upfdater

  • Property svn:executable set to *
File size: 850 bytes
Line 
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides:             pmid2doi-updater
4# Required-Start:       $local_fs $network mysql
5# Required-Stop:        $local_fs $network
6# Should-Start:         
7# Should-Stop:         
8# Default-Start:        2 3 4 5
9# Default-Stop:         0 1 6
10# Short-Description:    PMID2DOI map updater
11# Description:          PMID2DOI mapper updater querying crossref to find new maps
12### END INIT INFO
13
14# Workaround for the deployment until we fix how we set the local configuration through properties
15cd /opt/pmid2doi-updater
16
17case $1 in
18   stop)
19     pgid=`ps axo user,comm,pgid | grep pmid2doi | grep run.sh | awk '{print $3}'`
20     if [ x$pgid != x ]; then
21       kill -15 -$pgid
22     fi
23     ;;
24
25   start)
26     sudo su -c "./run.sh&" pmid2doi
27     ;;
28
29   restart)
30     $0 stop
31     $0 start
32     ;;
33
34   *)
35     echo usage: $0 "[stop|start|restart]" 1>&2
36
37esac
Note: See TracBrowser for help on using the repository browser.