mhop...
This commit is contained in:
@@ -14,8 +14,19 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apk add sudo
|
$STD apk add --no-cache sudo
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
motd_ssh
|
msg_info "Installing Gitea"
|
||||||
customize
|
$STD apk add --no-cache gitea
|
||||||
|
msg_ok "Installed Gitea"
|
||||||
|
|
||||||
|
msg_info "Enabling Gitea Service"
|
||||||
|
$STD rc-update add gitea default
|
||||||
|
msg_ok "Enabled Gitea Service"
|
||||||
|
|
||||||
|
msg_info "Starting Gitea"
|
||||||
|
$STD service gitea start
|
||||||
|
msg_ok "Started Gitea"
|
||||||
|
|
||||||
|
~
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ update_os
|
|||||||
|
|
||||||
msg_info "Installing Alpine-Mosquitto_Zigbee2MQTT_haBridge"
|
msg_info "Installing Alpine-Mosquitto_Zigbee2MQTT_haBridge"
|
||||||
|
|
||||||
# mosquitto
|
# mosquitto -----------------
|
||||||
|
|
||||||
msg_info "Installing Mosquitto"
|
msg_info "Installing Mosquitto"
|
||||||
$STD apk add mosquitto
|
$STD apk add mosquitto
|
||||||
mosquitto_config=/etc/mosquitto/mosquitto.conf
|
mosquitto_config=/etc/mosquitto/mosquitto.conf
|
||||||
@@ -24,14 +25,15 @@ sed -i -e "s/^#listener.*$/listener 1883/" $mosquitto_config
|
|||||||
rc-update add mosquitto
|
rc-update add mosquitto
|
||||||
rc-service mosquitto start
|
rc-service mosquitto start
|
||||||
|
|
||||||
# ha-bridge
|
# ha-bridge -----------------
|
||||||
|
|
||||||
msg_info "Installing haBridge"
|
msg_info "Installing haBridge"
|
||||||
$STD apk add openjdk11
|
$STD apk add openjdk11
|
||||||
java --version
|
java --version
|
||||||
mkdir -p /opt/habridge
|
mkdir -p /opt/habridge
|
||||||
cd /opt/habridge
|
cd /opt/habridge
|
||||||
release=$( curl -fsSL https://api.github.com/repos/bwssytems/ha-bridge/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
release=$( curl -fsSL https://api.github.com/repos/bwssytems/ha-bridge/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
wget -q https://github.com/bwssytems/ha-bridge/releases/download/v5.4.1/ha-bridge-${release}.jar
|
wget -q https://github.com/bwssytems/ha-bridge/releases/download/v${release}/ha-bridge-${release}.jar
|
||||||
initfile=/etc/init.d/habridge
|
initfile=/etc/init.d/habridge
|
||||||
cat > $initfile <<\EOF
|
cat > $initfile <<\EOF
|
||||||
#!/sbin/openrc-run
|
#!/sbin/openrc-run
|
||||||
@@ -76,7 +78,8 @@ rc-update add habridge default
|
|||||||
rc-service habridge start
|
rc-service habridge start
|
||||||
rc-service habridge status
|
rc-service habridge status
|
||||||
|
|
||||||
# zigbee2mqtt
|
# zigbee2mqtt ----------------
|
||||||
|
|
||||||
set2net_ip=192.168.178.29
|
set2net_ip=192.168.178.29
|
||||||
set2net_port=20108
|
set2net_port=20108
|
||||||
ser2net_baud=115200
|
ser2net_baud=115200
|
||||||
@@ -110,7 +113,48 @@ $STD rc-service zigbee2mqtt status
|
|||||||
|
|
||||||
msg_ok "Installed Alpine-Zigbee2MQTT"
|
msg_ok "Installed Alpine-Zigbee2MQTT"
|
||||||
|
|
||||||
|
# tuya-mqtt -------------------------
|
||||||
|
|
||||||
|
$STD apk add npm git
|
||||||
|
cd /opt
|
||||||
|
git clone https://github.com/lehanspb/tuya-mqtt
|
||||||
|
cd tuya-mqtt
|
||||||
|
npm install
|
||||||
|
npm audit fix --force
|
||||||
|
|
||||||
|
# influxdb ---------------------------
|
||||||
|
|
||||||
|
# https://github.com/woahbase/alpine-influxdb/blob/master/Dockerfile
|
||||||
|
|
||||||
|
INFLUXDB_HOME=/var/lib/influxdb \
|
||||||
|
INFLUXDB_CONFIG_PATH=/etc/influxdb.conf
|
||||||
|
|
||||||
|
$STD apk add -Uu --purge --no-cache ca-certificates
|
||||||
|
# influxdb unavailable in repos since v3.17
|
||||||
|
# newer builds will not have armv7l/armhf
|
||||||
|
{ REPO=v3.17; \
|
||||||
|
echo "http://dl-cdn.alpinelinux.org/alpine/${REPO}/main"; \
|
||||||
|
echo "http://dl-cdn.alpinelinux.org/alpine/${REPO}/community"; \
|
||||||
|
} > /tmp/repo
|
||||||
|
$STD apk add --no-cache --repositories-file "/tmp/repo" influxdb
|
||||||
|
update-ca-certificates
|
||||||
|
mkdir -p defaults ${INFLUXDB_HOME}
|
||||||
|
|
||||||
|
mv ${INFLUXDB_CONFIG_PATH} /defaults/influxdb.conf.default
|
||||||
|
if [ ! -e /etc/nsswitch.conf ]; then
|
||||||
|
echo 'hosts: files dns' > /etc/nsswitch.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
# grafana --------------
|
||||||
|
|
||||||
|
msg_info "Installing Grafana"
|
||||||
|
$STD apk add grafana
|
||||||
|
$STD sed -i '/http_addr/s/127.0.0.1/0.0.0.0/g' /etc/conf.d/grafana
|
||||||
|
$STD rc-service grafana start
|
||||||
|
$STD rc-update add grafana default
|
||||||
|
msg_ok "Installed Grafana"
|
||||||
|
|
||||||
|
rm -rf /var/cache/apk/* /tmp/*
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
Reference in New Issue
Block a user