mirror of https://github.com/tteck/Proxmox.git
Compare commits
10 Commits
a7a1c1717c
...
ac837891e0
Author | SHA1 | Date |
---|---|---|
|
ac837891e0 | |
|
4db1c1360e | |
|
676f240113 | |
|
642048fb6d | |
|
86ec03dc35 | |
|
ac62f07362 | |
|
d345712e7b | |
|
18af21a1cc | |
|
1e42e065b4 | |
|
38307912f8 |
|
@ -66,9 +66,10 @@ function update_script() {
|
||||||
header_info
|
header_info
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
1)
|
1)
|
||||||
esphome stop
|
msg_info "Updating ESPHome"
|
||||||
pip3 install esphome --upgrade
|
pip3 install esphome --upgrade &>/dev/null
|
||||||
esphome start
|
rc-service -q esphome restart
|
||||||
|
msg_ok "Updated Successfully!"
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -0,0 +1,85 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
|
||||||
|
# Copyright (c) 2021-2023 tteck
|
||||||
|
# Author: tteck (tteckster)
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||||
|
|
||||||
|
function header_info {
|
||||||
|
clear
|
||||||
|
cat <<"EOF"
|
||||||
|
_ ____ __
|
||||||
|
| | / / /_ ____ ____ ____ _/ /__
|
||||||
|
| | /| / / __ \/ __ \/ __ \/ __ `/ / _ \
|
||||||
|
| |/ |/ / / / / /_/ / /_/ / /_/ / / __/
|
||||||
|
|__/|__/_/ /_/\____/\____/\__, /_/\___/
|
||||||
|
Alpine /____/
|
||||||
|
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
header_info
|
||||||
|
echo -e "Loading..."
|
||||||
|
APP="Alpine-Whoogle"
|
||||||
|
var_disk="0.3"
|
||||||
|
var_cpu="1"
|
||||||
|
var_ram="256"
|
||||||
|
var_os="alpine"
|
||||||
|
var_version="3.17"
|
||||||
|
variables
|
||||||
|
color
|
||||||
|
catch_errors
|
||||||
|
|
||||||
|
function default_settings() {
|
||||||
|
CT_TYPE="1"
|
||||||
|
PW=""
|
||||||
|
CT_ID=$NEXTID
|
||||||
|
HN=$NSAPP
|
||||||
|
DISK_SIZE="$var_disk"
|
||||||
|
CORE_COUNT="$var_cpu"
|
||||||
|
RAM_SIZE="$var_ram"
|
||||||
|
BRG="vmbr0"
|
||||||
|
NET=dhcp
|
||||||
|
GATE=""
|
||||||
|
DISABLEIP6="no"
|
||||||
|
MTU=""
|
||||||
|
SD=""
|
||||||
|
NS=""
|
||||||
|
MAC=""
|
||||||
|
VLAN=""
|
||||||
|
SSH="no"
|
||||||
|
VERB="no"
|
||||||
|
echo_default
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
if [[ ! -f /usr/bin/whoogle-search ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||||
|
while true; do
|
||||||
|
CHOICE=$(
|
||||||
|
whiptail --title "SUPPORT" --menu "Select option" 11 58 1 \
|
||||||
|
"1" "Check for Whoogle Updates" 3>&2 2>&1 1>&3
|
||||||
|
)
|
||||||
|
exit_status=$?
|
||||||
|
if [ $exit_status == 1 ]; then
|
||||||
|
clear
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
header_info
|
||||||
|
case $CHOICE in
|
||||||
|
1)
|
||||||
|
msg_info "Updating Whoogle"
|
||||||
|
pip3 install whoogle-search --upgrade &>/dev/null
|
||||||
|
rc-service -q whoogle restart
|
||||||
|
msg_ok "Updated Successfully!"
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
start
|
||||||
|
build_container
|
||||||
|
description
|
||||||
|
|
||||||
|
msg_ok "Completed Successfully!\n"
|
||||||
|
echo -e "${APP} should be reachable by going to the following URL.
|
||||||
|
${BL}http://${IP}:5000${CL} \n"
|
|
@ -22,42 +22,29 @@ $STD apk add mc
|
||||||
$STD apk add git
|
$STD apk add git
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Alpine-ESPHome"
|
msg_info "Installing pip3 Package Manager"
|
||||||
$STD apk add py3-pip
|
$STD apk add py3-pip
|
||||||
|
msg_ok "Installed pip3 Package Manager"
|
||||||
|
|
||||||
|
msg_info "Installing Alpine-ESPHome"
|
||||||
$STD pip3 install esphome
|
$STD pip3 install esphome
|
||||||
$STD pip3 install tornado esptool
|
$STD pip3 install tornado esptool
|
||||||
cat <<EOF >/etc/init.d/esphome
|
|
||||||
#!/sbin/openrc-run
|
|
||||||
|
|
||||||
name="esphome"
|
|
||||||
description="ESPHome Service"
|
|
||||||
command="/usr/bin/esphome /root/config/ dashboard"
|
|
||||||
pidfile="/run/$RC_SVCNAME/pid"
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
need net
|
|
||||||
}
|
|
||||||
|
|
||||||
start_pre() {
|
|
||||||
checkpath --directory --mode 0755 /run/$RC_SVCNAME
|
|
||||||
}
|
|
||||||
|
|
||||||
|
echo "#!/sbin/openrc-run
|
||||||
|
description=\"ESPHome\"
|
||||||
|
pidfile=\"/run/esphome.pid\"
|
||||||
start() {
|
start() {
|
||||||
ebegin "Starting $description"
|
esphome dashboard /root/esphome/config/ > /dev/null 2>&1 &
|
||||||
start-stop-daemon --start --quiet --exec $command
|
echo \$! > \$pidfile
|
||||||
eend $?
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
ebegin "Stopping $description"
|
kill \$(cat \$pidfile)
|
||||||
start-stop-daemon --stop --quiet --exec $command
|
rm \$pidfile
|
||||||
eend $?
|
}" > /etc/init.d/esphome
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
chmod 755 /etc/init.d/esphome
|
chmod 755 /etc/init.d/esphome
|
||||||
/etc/init.d/esphome start
|
rc-service -q esphome start
|
||||||
rc-update add esphome default
|
rc-update add -q esphome default
|
||||||
msg_ok "Installed Alpine-ESPHome"
|
msg_ok "Installed Alpine-ESPHome"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2023 tteck
|
||||||
|
# Author: tteck (tteckster)
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||||
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
|
|
||||||
|
color
|
||||||
|
verb_ip6
|
||||||
|
catch_errors
|
||||||
|
setting_up_container
|
||||||
|
network_check
|
||||||
|
update_os
|
||||||
|
|
||||||
|
msg_info "Installing Dependencies"
|
||||||
|
$STD apk add newt
|
||||||
|
$STD apk add curl
|
||||||
|
$STD apk add openssh
|
||||||
|
$STD apk add nano
|
||||||
|
$STD apk add mc
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Installing pip3 Package Manager"
|
||||||
|
$STD apk add py3-pip
|
||||||
|
msg_ok "Installed pip3 Package Manager"
|
||||||
|
|
||||||
|
msg_info "Installing Alpine-Whoogle"
|
||||||
|
$STD pip3 install brotli
|
||||||
|
$STD pip3 install whoogle-search
|
||||||
|
|
||||||
|
echo "#!/sbin/openrc-run
|
||||||
|
description=\"Whoogle-Search\"
|
||||||
|
pidfile=\"/run/whoogle.pid\"
|
||||||
|
|
||||||
|
start() {
|
||||||
|
/usr/bin/whoogle-search --host 0.0.0.0 &
|
||||||
|
echo \$! > \$pidfile
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
kill \$(cat \$pidfile)
|
||||||
|
rm \$pidfile
|
||||||
|
}" > /etc/init.d/whoogle
|
||||||
|
|
||||||
|
chmod 755 /etc/init.d/whoogle
|
||||||
|
rc-service -q whoogle start
|
||||||
|
rc-update add -q whoogle default
|
||||||
|
msg_ok "Installed Alpine-Whoogle"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
root
|
Loading…
Reference in New Issue