source: Slackware/i2p-base/rc.i2p_def @ 5190b2d

Last change on this file since 5190b2d was 5190b2d, checked in by sponge <sponge@…>, 11 years ago

Fixups to Slackware scripts

  • Property mode set to 100644
File size: 984 bytes
Line 
1#!/bin/sh
2# Start/stop i2p service.
3
4i2p_start() {
5 /bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory start )"
6}
7
8i2p_stop() {
9 /bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory stop )"
10}
11
12i2p_restart() {
13 /bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory restart)"
14}
15
16i2p_status() {
17 /bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory status )"
18}
19
20i2p_console() {
21 /bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory console )"
22}
23
24i2p_dump() {
25 /bin/su - -c "( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\"; directory dump )"
26}
27
28case "$1" in
29'start')
30  i2p_start
31  ;;
32'stop')
33  i2p_stop
34  ;;
35'restart')
36  i2p_restart
37  ;;
38'status')
39  i2p_status
40  ;;
41'console')
42  i2p_console
43  ;;
44'dump')
45  i2p_dump
46  ;;
47*)
48  echo "usage $0 start|stop|restart|status|console|dump"
49  ;;
50esac
51
Note: See TracBrowser for help on using the repository browser.