Skip to content

Commit

Permalink
Working static route
Browse files Browse the repository at this point in the history
  • Loading branch information
mikolajs committed Nov 12, 2013
2 parents a91b41a + 3bbfdf6 commit 2dd0c38
Show file tree
Hide file tree
Showing 24 changed files with 770 additions and 70 deletions.
2 changes: 1 addition & 1 deletion ansible_commands.txt
Expand Up @@ -4,7 +4,7 @@
ansible all -m ping

#uruchamianie komendy
ansible all -a "comand full" --user=administrator -K
ansible all -m command -a "comand full" --user=administrator -K

#instalacja pakietu
ansible all -m apt -a "pkg=eclipse state=present" --user=administrator -K
13 changes: 13 additions & 0 deletions client-bin/copy.sh
@@ -0,0 +1,13 @@
#!/bin/bash

for i in {2..40}
do
IP=10.0.0.$i
echo $IP
SSH_USER="administrator@"$IP":/home/administrator/"
echo $SSH_USER
scp ./install.sh $SSH_USER
scp ./pinger $SSH_USER
ssh -t administrator@$IP "sudo sh /home/administrator/install.sh"
done

27 changes: 23 additions & 4 deletions client-bin/install.sh
@@ -1,5 +1,19 @@
#!/bin/sh

#SERVER_KEY="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC549PVa3R2ynarnP3aZK18JU5swbr30B0y00IvXV4NosmfXGQ4fM6qZNQCbUbydQr1YENOC7W+TKmqPuouWYkCFvGsy00rlC3Hb9cBETpScp2nQoYzFRTZ7rbo+oy3OC7smWe+tRMHhvXmOTsVDaHtmKiN4Cl/R/E3rE26gOlhR46VmVPbyAVmx9fkbI+cB8sPIECOnJ2xyXdKOgqz/G94Nw/DvTx6DiKFnnjTyEjAytmuTNVpAjV26VBe8cV3yI5tlX+ZBR4Z/ez9ntAuvBTuQ351xvkD53avPwn48dDl2pH/g3/veAsO+QIoN0iBa39NbgccShWJ9ybRF2Bhbt/b mikolajsochacki@gmail.com"

#install packages
#echo "install ssh"
#apt-get install ssh -y
#echo "install libsoup"
#apt-get install libsoup2.4-1 -y

#echo "create ssh"
#mkdir $HOME/.ssh
#echo "insert key to authorized Keys"
#echo $SERVER_KEY > $HOME/.ssh/authorized_keys
#echo "change mod"
#chmod 755 $HOME/.ssh/authorized_keys

BINARY_PATH=/usr/bin/pinger-ansible
INITD_PATH=/etc/init.d/pinger-ansible
Expand All @@ -19,21 +33,26 @@ echo "#port to ping default: 8989" >> $CONF_PATH
echo "server_port=8989" >> $CONF_PATH
echo "" >> $CONF_PATH
echo "#time in minutes in witch program ping again after success min: 10 minutes" >> $CONF_PATH
echo "time_ping=60" >> $CONF_PATH
echo "time_ping=20" >> $CONF_PATH
echo "" >> $CONF_PATH
echo "#time in minutes in witch program ping again after fail (not found server) min = 1 minute" >> $CONF_PATH
echo "time_step=10" >> $CONF_PATH
echo "time_step=5" >> $CONF_PATH
chmod 755 $CONF_PATH

killall -9 pinger-ansible

cp pinger $BINARY_PATH
chmod 755 $BINARY_PATH

#create start file
echo "#!/bin/sh" > $INITD_PATH
echo "#start pinger-ansible" >> $INITD_PATH
echo " " >> $INITD_PATH
echo "/usr/bin/pinger-ansible &" >> $INITD_PATH
echo " " >> $INITD_PATH
chmod 755 $INITD_PATH

ln -s $INITD_PATH /etc/rc5.d/S78pinger-ansible
ln -s $INITD_PATH /etc/rc2.d/S78pinger-ansible

$BINARY_PATH&
$BINARY_PATH &

6 changes: 6 additions & 0 deletions client-bin/remote_install.sh
@@ -0,0 +1,6 @@
#!/bin/bash
for IP in {2..40}
do
ssh -t administrator@10.0.0.$IP "sudo sh /home/administrator/install.sh"
done

98 changes: 54 additions & 44 deletions install.sh
@@ -1,46 +1,56 @@
#!/bin/sh

#
# Shell script to download and install a Scala language specification
# for the Gedit text editor.
#
# (c) Sarah Mount 26 Jan 2012.
# updated by Felix Dietze 05 Jul 2012
#
echo "Installing Scala language spec and mime type..."

# Install the language spec
mkdir -p ~/.gnome2/gtksourceview-1.0/language-specs/
wget -q https://raw.github.com/scala/scala-dist/master/tool-support/src/gedit/scala.lang -O ~/.gnome2/gtksourceview-1.0/language-specs/scala.lang

# Add a MIME type for Scala files.
mkdir -p ~/.local/share/mime/packages
cat > ~/.local/share/mime/packages/Scala.xml << EOF
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="text/x-scala">
<comment>Scala Source</comment>
<!-- more translated comment elements -->
<glob pattern="*.scala"/>
</mime-type>
</mime-info>
EOF

update-mime-database ~/.local/share/mime




echo "Installing Scala gedit plugin..."

mkdir -p ~/.local/share/gedit/plugins
wget -q https://raw.github.com/snim2/gedit-scala-plugin/master/flyscala.plugin -O ~/.local/share/gedit/plugins/flyscala.plugin
wget -q https://raw.github.com/snim2/gedit-scala-plugin/master/flyscala.gedit-plugin -O ~/.local/share/gedit/plugins/flyscala.gedit-plugin
wget -q https://raw.github.com/snim2/gedit-scala-plugin/master/flyscala.py -O ~/.local/share/gedit/plugins/flyscala.py

# Installing gsettings scheme for the flyscala plugin
wget -q https://raw.github.com/snim2/gedit-scala-plugin/master/org.gnome.gedit.plugins.flyscala.gschema.xml -O org.gnome.gedit.plugins.flyscala.gschema.xml
gksudo mv org.gnome.gedit.plugins.flyscala.gschema.xml /usr/share/glib-2.0/schemas/
gksudo glib-compile-schemas /usr/share/glib-2.0/schemas/

echo "done."
echo "Please start gedit and activate the Scala On The Fly plugin from the Edit->Preferences dialog"
SERVER_KEY="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC549PVa3R2ynarnP3aZK18JU5swbr30B0y00IvXV4NosmfXGQ4fM6qZNQCbUbydQr1YENOC7W+TKmqPuouWYkCFvGsy00rlC3Hb9cBETpScp2nQoYzFRTZ7rbo+oy3OC7smWe+tRMHhvXmOTsVDaHtmKiN4Cl/R/E3rE26gOlhR46VmVPbyAVmx9fkbI+cB8sPIECOnJ2xyXdKOgqz/G94Nw/DvTx6DiKFnnjTyEjAytmuTNVpAjV26VBe8cV3yI5tlX+ZBR4Z/ez9ntAuvBTuQ351xvkD53avPwn48dDl2pH/g3/veAsO+QIoN0iBa39NbgccShWJ9ybRF2Bhbt/b mikolajsochacki@gmail.com"

#install packages
#echo "install ssh"
#apt-get install ssh -y
#echo "install libsoup"
#apt-get install libsoup2.4-1 -y

echo "create ssh"
mkdir $HOME/.ssh
echo "insert key to authorized Keys"
echo $SERVER_KEY > $HOME/.ssh/authorized_keys
echo "change mod"
chmod 755 $HOME/.ssh/authorized_keys

BINARY_PATH=/usr/bin/pinger-ansible
INITD_PATH=/etc/init.d/pinger-ansible
CONF_PATH=/etc/ansible/webapt.conf

mkdir /etc/ansible

echo "#config file for client pinger" > $CONF_PATH
echo "" >> $CONF_PATH
echo "#server addres X.X.X.X or domain.com" >> $CONF_PATH
echo "server_ip=192.168.28.100" >> $CONF_PATH
echo "" >> $CONF_PATH
echo "#password: now not used" >> $CONF_PATH
echo "password=haslomaslo" >> $CONF_PATH
echo "" >> $CONF_PATH
echo "#port to ping default: 8989" >> $CONF_PATH
echo "server_port=8989" >> $CONF_PATH
echo "" >> $CONF_PATH
echo "#time in minutes in witch program ping again after success min: 10 minutes" >> $CONF_PATH
echo "time_ping=20" >> $CONF_PATH
echo "" >> $CONF_PATH
echo "#time in minutes in witch program ping again after fail (not found server) min = 1 minute" >> $CONF_PATH
echo "time_step=5" >> $CONF_PATH
chmod 755 $CONF_PATH

cp pinger $BINARY_PATH
chmod 755 $BINARY_PATH

#create start file
echo "#!/bin/sh" > $INITD_PATH
echo "#start pinger-ansible" >> $INITD_PATH
echo " " >> $INITD_PATH
echo "/usr/bin/pinger-ansible &" >> $INITD_PATH
echo " " >> $INITD_PATH
chmod 755 $INITD_PATH

ln -s $INITD_PATH /etc/rc2.d/S78pinger-ansible

$BINARY_PATH &

9 changes: 9 additions & 0 deletions webapt/src/main/resources/static/bootstrap-theme.min.css

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions webapt/src/main/resources/static/bootstrap.min.css

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions webapt/src/main/resources/static/bootstrap.min.js

Large diffs are not rendered by default.

Binary file not shown.

0 comments on commit 2dd0c38

Please sign in to comment.