source: Slackware/i2p-base/doinst.sh @ c4870021

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

SlackBuild?!

  • Property mode set to 100644
File size: 1.2 KB
Line 
1#!/bin/sh
2touch /etc/rc.d/rc.local
3touch /etc/rc.d/rc.local_shutdown
4
5I2PRCA=`grep -c /etc/rc.d/rc.local -e i2p`
6I2PRCB=`grep -c /etc/rc.d/rc.local_shutdown -e i2p`
7
8echo
9
10if [ $I2PRCA -eq 0 ] ; then
11        echo "if [ -x /etc/rc.d/rc.i2p ] ; then" >> /etc/rc.d/rc.local
12        echo "        sh /etc/rc.d/rc.i2p start" >> /etc/rc.d/rc.local
13        echo "fi" >> /etc/rc.d/rc.local
14        echo "/etc/rc.d/rc.local modified."
15else
16        echo "/etc/rc.d/rc.local looks OK"
17fi
18
19if [ $I2PRCB -eq 0 ] ; then
20        echo "if [ -x /etc/rc.d/rc.i2p ] ; then" >> /etc/rc.d/rc.local_shutdown
21        echo "        sh /etc/rc.d/rc.i2p stop" >> /etc/rc.d/rc.local_shutdown
22        echo "fi" >> /etc/rc.d/rc.local_shutdown
23        echo "/etc/rc.d/rc.local_shutdown modified."
24else
25        echo "/etc/rc.d/rc.local_shutdown looks OK"
26fi
27
28if [ -f /etc/rc.d/rc.i2p ] ; then
29        if [ -x /etc/rc.d/rc.i2p ] ; then
30                chmod +x /etc/rc.d/rc.i2p.new
31        fi
32        echo
33        echo "It apears that you already have /etc/rc.d/rc.i2p"
34        echo "You may wish to replace it with /etc/rc.d/rc.i2p.new"
35        echo
36else
37        mv /etc/rc.d/rc.i2p.new /etc/rc.d/rc.i2p
38        echo
39        echo "Installation finished. The i2p start/stop script has been"
40        echo "installed on /etc/rc.d directory. You should chmod +x"
41        echo '/etc/rc.d/rc.i2p to start it on boot.'
42        echo
43fi
44
45exit
Note: See TracBrowser for help on using the repository browser.