File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ # /etc/init.d/cdr_parser
2+ #
3+ ### BEGIN INIT INFO
4+ # Provides: cdr_daemon
5+ # Required-Start:
6+ # Should-Start:
7+ # Required-Stop:
8+ # Should-Stop:
9+ # Default-Start: 3 5
10+ # Default-Stop: 0 1 2 6
11+ # Short-Description: CDR Parser Daemon
12+ # Description: Runs the CDR Parser Daemon
13+ ### END INIT INFO
14+
15+ case "$1" in
16+ start)
17+ echo "Starting server"
18+ # Start the daemon
19+ python /opt/cdr_parser/cdr_parser.py start
20+ ;;
21+ stop)
22+ echo "Stopping server"
23+ # Stop the daemon
24+ python /opt/cdr_parser/cdr_parser.py stop
25+ ;;
26+ restart)
27+ echo "Restarting server"
28+ python /opt/cdr_parser/cdr_parser.py restart
29+ ;;
30+ *)
31+ # Refuse to do other stuff
32+ echo "Usage: /etc/init.d/cdr_parser {start|stop|restart}"
33+ exit 1
34+ ;;
35+ esac
36+
37+ exit 0
You can’t perform that action at this time.
0 commit comments