-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upload most of the stuff that's been customized to create RasPwn.
- Loading branch information
Alpha Charlie
committed
Sep 5, 2016
1 parent
bbd7207
commit 107d77f
Showing
25 changed files
with
210 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
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,46 @@ | ||
#!/bin/sh | ||
for TMPFILE in $(find /var/log -type f -name "*1.gz") | ||
do | ||
rm -fv $TMPFILE | ||
done | ||
for TMPFILE in $(find /var/log -type f -name "*2.gz") | ||
do | ||
rm -fv $TMPFILE | ||
done | ||
for TMPFILE in $(find /var/log -type f -name "*3.gz") | ||
do | ||
rm -fv $TMPFILE | ||
done | ||
for TMPFILE in $(find /var/log -type f -name "*4.gz") | ||
do | ||
rm -fv $TMPFILE | ||
done | ||
for TMPFILE in $(find /var/log -type f -name "*5.gz") | ||
do | ||
rm -fv $TMPFILE | ||
done | ||
for TMPFILE in $(find /var/log/samba -type f) | ||
do | ||
rm -fv $TMPFILE | ||
done | ||
for TMPFILE in $(find /var/log -type f) | ||
do | ||
cp -vf /dev/null $TMPFILE; | ||
done | ||
|
||
rm -vf /root/.*history* | ||
rm -vf /home/pi/.*history* | ||
rm -rf /var/cache/apt/archives/*.deb | ||
find / -type f -name "*-old" |xargs rm -rf | ||
rm -rf /var/backups/* | ||
|
||
#echo 'Cleaning Swap...' | ||
#swapoff -a | ||
#rm -vf /var/swap | ||
#(pv -n /dev/zero | dd of=/var/swap bs=2M count=256) 2>&1 | dialog --gauge "Cleaning Swap..." 10 70 0 | ||
#echo 'Cleaning Free Space...' | ||
#(pv -n /dev/zero | dd of=/tmp.file bs=2M) 2>&1 | dialog --gauge "Cleaning Free Space..." 10 70 0 | ||
#rm -vf /tmp.file | ||
echo '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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
|
||
if [ ! -f /etc/.firstboot ]; then | ||
echo "First Boot!\n"; | ||
# first we expand the filesystem | ||
raspi-config --expand-rootfs | ||
# Do other setup stuff here? | ||
|
||
|
||
|
||
#generate the firstboot timestamp | ||
date > /etc/.firstboot | ||
#force a reboot | ||
shutdown -r now | ||
fi |
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,28 @@ | ||
#!/bin/sh | ||
# Script to enable the Raspwn Playground on Apache2 (instead of Nginx) | ||
|
||
#First disable Nginx Playground | ||
rm -vf /etc/nginx/sites-enabled/* | ||
ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default | ||
|
||
#Now enable Apache2 Playground | ||
rm /etc/apache2/sites-enabled/* | ||
cp -vf /etc/apache2/ports.conf-wifi /etc/apache2/ports.conf | ||
a2ensite playground.raspwn.org-wifi | ||
a2ensite playground.raspwn.org-ssl-wifi | ||
|
||
# Now restart | ||
service nginx stop | ||
service apache2 restart | ||
|
||
update-rc.d nginx disable | ||
update-rc.d apache2 defaults | ||
|
||
/bin/echo -e 'RasPwn Web Playground now configured to use Apache over Wifi ONLY.'; | ||
/bin/echo -e ''; | ||
/bin/echo -e 'Use \e[1mplayground-cfg-apache-promisc\e[0m to also listen on eth0 \e[31m(DANGEROUS!)\e[39m'; | ||
/bin/echo -e 'Use \e[1mplayground-cfg-nginx\e[0m to use Nginx as the http server'; | ||
/bin/echo -e 'Use \e[1mplayground-cfg-nginx-promisc\e[0m to use Nginx AND also listen on eth0 \e[31m(DANGEROUS!)\e[39m'; | ||
/bin/echo -e 'Use \e[1mplayground-cfg-mix\e[0m for BOTH Apache2(192.168.99.13) and Nginx(192.168.99.7)'; | ||
|
||
|
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,30 @@ | ||
#!/bin/sh | ||
# Script to enable the Raspwn Playground on Apache2 (instead of Nginx) | ||
|
||
#First disable Nginx Playground | ||
rm -vf /etc/nginx/sites-enabled/* | ||
ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default | ||
|
||
#Now enable Apache2 Playground | ||
rm /etc/apache2/sites-enabled/* | ||
cp -vf /etc/apache2/ports.conf-promisc /etc/apache2/ports.conf | ||
a2ensite playground.raspwn.org | ||
a2ensite playground.raspwn.org-ssl | ||
|
||
# Now restart | ||
service nginx stop | ||
service apache2 restart | ||
|
||
update-rc.d nginx disable | ||
update-rc.d apache2 defaults | ||
|
||
/bin/echo -e 'RasPwn Web Playground now configured to use Apache over both WiFi and Eth0.'; | ||
/bin/echo -e ' \e[31mDANGER WILL ROBINSON! ONLY DO THIS BEHIND A FIREWALL/NAT!!!'; | ||
/bin/echo -e ' \e[1;31m(AND MAYBE NOT EVEN THEN....)\e[0;39m'; | ||
/bin/echo -e ''; | ||
/bin/echo -e 'Use \e[1mplayground-cfg-apache\e[0m to only listen on WiFi'; | ||
/bin/echo -e 'Use \e[1mplayground-cfg-nginx\e[0m to use Nginx as the http server'; | ||
/bin/echo -e 'Use \e[1mplayground-cfg-nginx-promisc\e[0m to use Nginx AND also listen on eth0 \e[31m(DANGEROUS!)\e[39m'; | ||
/bin/echo -e 'Use \e[1mplayground-cfg-mix\e[0m for BOTH Apache2(192.168.99.13) and Nginx(192.168.99.7)'; | ||
|
||
|
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,31 @@ | ||
#!/bin/sh | ||
# Script to enable the Raspwn Playground on Apache2 (instead of Nginx) | ||
|
||
#First setup Apache2 Playground on 192.168.99.13 | ||
rm -vf /etc/apache2/sites-enabled/* | ||
a2ensite playground.raspwn.org-wifi | ||
a2ensite playground.raspwn.org-ssl-wifi | ||
cp /etc/apache2/ports.conf-wifi /etc/apache2/ports.conf | ||
|
||
#Now enable Nginx Playground on 192.168.99.7 | ||
rm /etc/nginx/sites-enabled/* | ||
ln -s /etc/nginx/sites-available/playground.raspwn.org-07 /etc/nginx/sites-enabled/playground.raspwn.org-07 | ||
|
||
# Now restart | ||
service apache2 stop | ||
service nginx stop | ||
service apache2 start | ||
service nginx start | ||
|
||
update-rc.d apache2 defaults | ||
update-rc.d nginx defaults | ||
|
||
/bin/echo -e 'RasPwn Web Playground now configured to use both Nginx and Apache2 on Wifi'; | ||
/bin/echo -e ' \e[31mCOULD BREAK THINGS...\e[39m '; | ||
/bin/echo -e ''; | ||
/bin/echo -e 'Use \e[1mplayground-cfg-apache\e[0m to use Apache2 as the http server' | ||
/bin/echo -e 'Use \e[1mplayground-cfg-apache-promisc\e[0m to also listen on eth0 \e[31m(DANGEROUS!)\e[39m'; | ||
/bin/echo -e 'Use \e[1mplayground-cfg-nginx\e[0m to use Nginx as the http server'; | ||
/bin/echo -e 'Use \e[1mplayground-cfg-nginx-promisc\e[0m to use Nginx AND also listen on eth0 \e[31m(DANGEROUS!)\e[39m'; | ||
|
||
|
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,29 @@ | ||
#!/bin/sh | ||
# Script to enable the Raspwn Playground on Apache2 (instead of Nginx) | ||
|
||
#First disable Apache2 Playground | ||
rm -vf /etc/apache2/sites-enabled/* | ||
a2ensite wackopicko.raspwn.org | ||
a2ensite default | ||
a2ensite default-ssl | ||
cp /etc/apache2/ports.conf-nginx /etc/apache2/ports.conf | ||
|
||
#Now enable Nginx Playground | ||
rm /etc/nginx/sites-enabled/* | ||
ln -s /etc/nginx/sites-available/playground.raspwn.org-wifi /etc/nginx/sites-enabled/playground.raspwn.org-wifi | ||
|
||
# Now restart | ||
service apache2 restart | ||
service nginx restart | ||
|
||
update-rc.d apache2 defaults | ||
update-rc.d nginx defaults | ||
|
||
/bin/echo -e 'RasPwn Web Playground is now configured to use Nginx over Wifi ONLY.'; | ||
/bin/echo -e ''; | ||
/bin/echo -e 'Use \e[1mplayground-cfg-apache\e[0m to use Apache2 as the http server'; | ||
/bin/echo -e 'Use \e[1mplayground-cfg-apache-promisc\e[0m to also listen on eth0 \e[31m(DANGEROUS!)\e[39m'; | ||
/bin/echo -e 'Use \e[1mplayground-cfg-nginx-promisc\e[0m to use Nginx AND also listen on eth0 \e[31m(DANGEROUS!)\e[39m'; | ||
/bin/echo -e 'Use \e[1mplayground-cfg-mix\e[0m for BOTH Apache2(192.168.99.13) and Nginx(192.168.99.7)'; | ||
|
||
|
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,31 @@ | ||
#!/bin/sh | ||
# Script to enable the Raspwn Playground on Apache2 (instead of Nginx) | ||
|
||
#First disable Apache2 Playground | ||
rm -vf /etc/apache2/sites-enabled/* | ||
a2ensite default | ||
a2ensite default-ssl | ||
a2ensite wackopicko.raspwn.org | ||
cp /etc/apache2/ports.conf-nginx /etc/apache2/ports.conf | ||
|
||
#Now enable Nginx Playground | ||
rm /etc/nginx/sites-enabled/* | ||
ln -s /etc/nginx/sites-available/playground.raspwn.org /etc/nginx/sites-enabled/playground.raspwn.org | ||
|
||
# Now restart | ||
service apache2 restart | ||
service nginx restart | ||
|
||
update-rc.d apache2 defaults | ||
update-rc.d nginx defaults | ||
|
||
/bin/echo -e 'RasPwn Web Playground now configured to use Nginx over both WiFi and Eth0.'; | ||
/bin/echo -e ' \e[31mDANGER WILL ROBINSON! ONLY DO THIS BEHIND A FIREWALL/NAT!!!'; | ||
/bin/echo -e ' \e[1;31m(AND MAYBE NOT EVEN THEN....)\e[0;39m'; | ||
/bin/echo -e ''; | ||
/bin/echo -e 'Use \e[1mplayground-cfg-apache\e[0m to use Apache2 as the http server'; | ||
/bin/echo -e 'Use \e[1mplayground-cfg-apache-promisc\e[0m to also listen on eth0 \e[31m(DANGEROUS!)\e[39m'; | ||
/bin/echo -e 'Use \e[1mplayground-cfg-nginx\e[0m to use Nginx as the http server'; | ||
/bin/echo -e 'Use \e[1mplayground-cfg-mix\e[0m for BOTH Apache2(192.168.99.13) and Nginx(192.168.99.7)'; | ||
|
||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.