Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
770 additions
and
70 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 & | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.