mirror of https://github.com/tteck/Proxmox.git
Compare commits
No commits in common. "ac837891e057ea19c2a9196e62aed4f1f121c1ea" and "a7a1c1717ce6c2e3a0a463fbff3c89fce5007af8" have entirely different histories.
ac837891e0
...
a7a1c1717c
|
@ -66,10 +66,9 @@ function update_script() {
|
|||
header_info
|
||||
case $CHOICE in
|
||||
1)
|
||||
msg_info "Updating ESPHome"
|
||||
pip3 install esphome --upgrade &>/dev/null
|
||||
rc-service -q esphome restart
|
||||
msg_ok "Updated Successfully!"
|
||||
esphome stop
|
||||
pip3 install esphome --upgrade
|
||||
esphome start
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -1,85 +0,0 @@
|
|||
#!/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,29 +22,42 @@ $STD apk add mc
|
|||
$STD apk add git
|
||||
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-ESPHome"
|
||||
$STD apk add py3-pip
|
||||
$STD pip3 install esphome
|
||||
$STD pip3 install tornado esptool
|
||||
cat <<EOF >/etc/init.d/esphome
|
||||
#!/sbin/openrc-run
|
||||
|
||||
echo "#!/sbin/openrc-run
|
||||
description=\"ESPHome\"
|
||||
pidfile=\"/run/esphome.pid\"
|
||||
start() {
|
||||
esphome dashboard /root/esphome/config/ > /dev/null 2>&1 &
|
||||
echo \$! > \$pidfile
|
||||
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
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting $description"
|
||||
start-stop-daemon --start --quiet --exec $command
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
kill \$(cat \$pidfile)
|
||||
rm \$pidfile
|
||||
}" > /etc/init.d/esphome
|
||||
ebegin "Stopping $description"
|
||||
start-stop-daemon --stop --quiet --exec $command
|
||||
eend $?
|
||||
}
|
||||
EOF
|
||||
|
||||
chmod 755 /etc/init.d/esphome
|
||||
rc-service -q esphome start
|
||||
rc-update add -q esphome default
|
||||
/etc/init.d/esphome start
|
||||
rc-update add esphome default
|
||||
msg_ok "Installed Alpine-ESPHome"
|
||||
|
||||
motd_ssh
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
#!/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