This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create an upstart | |
Create file /etc/init/myjob.conf | |
vi /etc/init/myjob.conf | |
with content like the following | |
description "my job" | |
start on startup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HTTP POST | |
response=$(curl -s -H "Content-Type: application/json" -X POST -d '{MESSAGE_inJSON}' http://POST URL | |
echo $response | |
# HTTP GET | |
response=$(curl -s http://GET URL) | |
echo $response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "--------------Disabling IPv6-------------------------" | |
echo 'net.ipv6.conf.all.disable_ipv6 = 1' >> /etc/sysctl.conf | |
echo 'net.ipv6.conf.default.disable_ipv6' >> /etc/sysctl.conf | |
echo 'net.ipv6.conf.lo.disable_ipv6 ' >> /etc/sysctl.conf | |
echo 'net.ipv6.conf.wlp3s0.disable_ipv6 ' >> /etc/sysctl.conf | |
sed -i -e 's/quiet splash/quiet splash ipv6.disable=1/g' /etc/default/grub | |
update-grub2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $# -eq 0]] ; then | |
echo "No argument supplied. Type sudo bash installjava.sh jdk1.8.0_74" | |
exit 1 | |
fi | |
if [ "$(whoami)" != "root" ]; then | |
echo "Sorry, please run as root. Type sudo bash installjava.sh jdk1.8.0_74" | |
exit 1 | |
fi |