12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- #!/bin/sh
- export basedir=/home/syjy/ipfcstV3
- chmod -R 777 $basedir
- cd $basedir/jdk
- tar -zxvf jdk-8u261-linux-x64.tar.gz
- if test -e /home/syjy/patch.zip
- then
- cd /home/syjy
- unzip -o patch.zip
- fi
- cp -f $basedir/settings/monitor /etc/init.d/
- cp -f $basedir/settings/console /etc/init.d/
- chmod 777 /etc/init.d/monitor
- chmod 777 /etc/init.d/console
- if test -x /usr/lib/systemd/system
- then
- cp -f $basedir/settings/monitor.service /usr/lib/systemd/system
- cp -f $basedir/settings/console.service /usr/lib/systemd/system
-
- chmod 777 /usr/lib/systemd/system/monitor.service
- chmod 777 /usr/lib/systemd/system/console.service
-
- systemctl daemon-reload
- systemctl enable monitor
- systemctl enable console
-
- else
- chkconfig monitor on
- chkconfig console on
- fi
- service monitor start
- service console start
- echo "Installation is complete!"
|