mirror of
https://gitlab.com/hacklab01/pivilion.git
synced 2025-04-30 00:57:16 +00:00
moved scripts to /usr/bin/local due to symlink errors
This commit is contained in:
parent
6e914f6626
commit
e5d369de30
@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
cat /home/pi/pivilion/config/dhcpcd.deny.wlan0 > /etc/dhcpcd.conf
|
|
||||||
|
|
||||||
sudo bash -c 'cat /home/pi/pivilion/config/interfaces.hotspot > /etc/network/interfaces'
|
|
||||||
|
|
||||||
sudo update-rc.d dnsmasq enable
|
|
||||||
|
|
||||||
sudo bash -c 'cat /home/pi/pivilion/config/rc.local.hotspot > /etc/rc.local'
|
|
||||||
|
|
||||||
echo "Your Rpi will reboot in hotspot mode"!
|
|
||||||
|
|
||||||
echo "hotspot" > /home/pi/pivilion/mode
|
|
@ -1,14 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
cat /home/pi/pivilion/config/dhcpcd.orig > /etc/dhcpcd.conf
|
|
||||||
|
|
||||||
sudo bash -c 'cat /home/pi/pivilion/config/interfaces.onion > /etc/network/interfaces'
|
|
||||||
|
|
||||||
sudo update-rc.d dnsmasq disable
|
|
||||||
|
|
||||||
sudo bash -c 'cat /home/pi/pivilion/config/rc.local.onion > /etc/rc.local'
|
|
||||||
|
|
||||||
echo "The next time you reboot, your Pi will start in onion mode"!
|
|
||||||
echo "Your onion domain is `cat /home/pi/pivilion/torname`"
|
|
||||||
echo "Access info at `cat /home/pi/pivilion/torname`/info"
|
|
||||||
echo "onion" > /home/pi/pivilion/mode
|
|
@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
echo "Enter SSID"
|
|
||||||
read name
|
|
||||||
echo "Enter password"
|
|
||||||
read password
|
|
||||||
wpa_passphrase "$name" "$password" >> /home/pi/pivilion/config/wpa_supplicant.conf
|
|
||||||
sudo bash -c "cp /home/pi/pivilion/config/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.conf"
|
|
||||||
echo "Configured Wifi networks"
|
|
||||||
sudo bash -c "cat /etc/wpa_supplicant/wpa_supplicant.conf"
|
|
||||||
echo "If this is correct set your Pi to restart in onion mode by running the onion command!"
|
|
@ -1,38 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
pause(){
|
|
||||||
read -n1 -rsp $'\nPress any key to continue or Ctrl+C to exit...\n\n'
|
|
||||||
}
|
|
||||||
|
|
||||||
sudo chown pi:pi /home/pi/pivilion/scripts/*
|
|
||||||
sudo chmod u+x /home/pi/pivilion/scripts/*
|
|
||||||
|
|
||||||
echo -e "\nWelcome to pivilion!"
|
|
||||||
|
|
||||||
let upSeconds="$(/usr/bin/cut -d. -f1 /proc/uptime)"
|
|
||||||
let secs=$((${upSeconds}%60))
|
|
||||||
let mins=$((${upSeconds}/60%60))
|
|
||||||
let hours=$((${upSeconds}/3600%24))
|
|
||||||
let days=$((${upSeconds}/86400))
|
|
||||||
UPTIME=`printf "%d days, %02dh%02dm%02ds" "$days" "$hours" "$mins" "$secs"`
|
|
||||||
|
|
||||||
# get the load averages
|
|
||||||
read one five fifteen rest < /proc/loadavg
|
|
||||||
echo "
|
|
||||||
@@@@@@@@@@@@@@@@@@@ `date +"%A, %e %B %Y, %r"`
|
|
||||||
@@@@@@, &@& *@@@@@@ `uname -srnmo`
|
|
||||||
@@@@@@@. .@@@@@@@ Uptime.............: ${UPTIME}
|
|
||||||
@@@@ .@@@. @@@@ Memory.............: `cat /proc/meminfo | grep MemFree | awk {'print $2'}`kB (Free) / `cat /proc/meminfo | grep MemTotal | awk {'print $2'}`kB (Total)
|
|
||||||
@ &@@@@.@@@@# @ Load Averages......: ${one}, ${five}, ${fifteen} (1, 5, 15 min)
|
|
||||||
@ @ . #@@@# . @ @ Running Processes..: `ps ax | wc -l | tr -d " "`
|
|
||||||
@ @@@, # ,@@@ @ Manual / more info.: pivilion.net
|
|
||||||
@@, @ ,@@ Onion Address......: `cat /home/pi/pivilion/torname`
|
|
||||||
@@@@@#@@@@@@@#@@@@@ Running in `cat /home/pi/pivilion/mode` mode"
|
|
||||||
pause
|
|
||||||
echo -e "There are four commands for you to use: \n \n 1) \"pivilion\" will display this message. \n \n 2) \"onion\" will set your Pi to start in onion mode on next reboot. \n \n 3) \"hotspot\" will set your Pi to start in hotspot mode on next reboot. This is the default mode. \n Please remember to set the mode properly before each reboot or you might have to access your Pi via ethernet cable or screen. \n \n 4) \"pikey\" is used to setup a Wifi network and password to be used in onion mode. \n \n A more thorough explanation is available at pivilion.net.\n"
|
|
||||||
|
|
||||||
echo -e "The following is a usage scenario."
|
|
||||||
pause
|
|
||||||
echo "I'm to lazy to write that ATM. =P"
|
|
||||||
pause
|
|
||||||
exit 0
|
|
0
usr/local/bin/hotspot
Normal file → Executable file
0
usr/local/bin/hotspot
Normal file → Executable file
0
usr/local/bin/onion
Normal file → Executable file
0
usr/local/bin/onion
Normal file → Executable file
0
usr/local/bin/pikey
Normal file → Executable file
0
usr/local/bin/pikey
Normal file → Executable file
7
usr/local/bin/pivilion
Normal file → Executable file
7
usr/local/bin/pivilion
Normal file → Executable file
@ -1,7 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
pause(){
|
pause(){
|
||||||
read -n1 -rsp $'\nPress any key to continue or Ctrl+C to exit...\n\n'
|
read -n1 -rsp $'\nPress any key to continue or Ctrl+C to exit...\n\n'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sudo chown pi:pi /home/pi/pivilion/scripts/*
|
||||||
|
sudo chmod u+x /home/pi/pivilion/scripts/*
|
||||||
|
|
||||||
echo -e "\nWelcome to pivilion!"
|
echo -e "\nWelcome to pivilion!"
|
||||||
|
|
||||||
let upSeconds="$(/usr/bin/cut -d. -f1 /proc/uptime)"
|
let upSeconds="$(/usr/bin/cut -d. -f1 /proc/uptime)"
|
||||||
@ -30,4 +35,4 @@ echo -e "The following is a usage scenario."
|
|||||||
pause
|
pause
|
||||||
echo "I'm to lazy to write that ATM. =P"
|
echo "I'm to lazy to write that ATM. =P"
|
||||||
pause
|
pause
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user