Skip to content

Commit 3fa516f

Browse files
push-app-to-main[bot]MickLeskasylumexp
authored
Hister (#16259)
* Add hister (ct) * Update source command in hister.sh Replace local source with direct curl command for build.func. * Update ct/hister.sh * Update install/hister-install.sh --------- Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: CanbiZ (MickLesk) <47820557+MickLesk@users.noreply.github.com> Co-authored-by: Sam Heinz <sam@samheinz.com>
1 parent 26abc11 commit 3fa516f

3 files changed

Lines changed: 112 additions & 0 deletions

File tree

ct/headers/hister

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
__ ___ __
2+
/ / / (_)____/ /____ _____
3+
/ /_/ / / ___/ __/ _ \/ ___/
4+
/ __ / (__ ) /_/ __/ /
5+
/_/ /_/_/____/\__/\___/_/
6+

ct/hister.sh

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: MickLesk (CanbiZ)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/asciimoo/hister
7+
8+
APP="Hister"
9+
var_tags="${var_tags:-search;browser-history;personal}"
10+
var_cpu="${var_cpu:-1}"
11+
var_ram="${var_ram:-1024}"
12+
var_disk="${var_disk:-20}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-13}"
15+
var_arm64="${var_arm64:-yes}"
16+
var_unprivileged="${var_unprivileged:-1}"
17+
18+
header_info "$APP"
19+
variables
20+
color
21+
catch_errors
22+
23+
function update_script() {
24+
header_info
25+
check_container_storage
26+
check_container_resources
27+
28+
if [[ ! -f /usr/local/bin/hister ]]; then
29+
msg_error "No ${APP} Installation Found!"
30+
exit
31+
fi
32+
33+
if check_for_gh_release "hister" "asciimoo/hister"; then
34+
msg_info "Stopping Service"
35+
systemctl stop hister
36+
msg_ok "Stopped Service"
37+
38+
fetch_and_deploy_gh_release "hister" "asciimoo/hister" "singlefile" "latest" "/usr/local/bin" "hister_*_linux_$(arch_resolve)"
39+
40+
msg_info "Starting Service"
41+
systemctl start hister
42+
msg_ok "Started Service"
43+
msg_ok "Updated successfully!"
44+
fi
45+
exit
46+
}
47+
48+
start
49+
build_container
50+
description
51+
52+
msg_ok "Completed Successfully!\n"
53+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
54+
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
55+
echo -e "${GATEWAY}${BGN}http://${IP}:4433${CL}"

install/hister-install.sh

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: MickLesk (CanbiZ)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/asciimoo/hister
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
fetch_and_deploy_gh_release "hister" "asciimoo/hister" "singlefile" "latest" "/usr/local/bin" "hister_*_linux_$(arch_resolve)"
17+
18+
msg_info "Configuring Hister"
19+
mkdir -p /opt/hister/data /etc/hister
20+
LOCAL_IP=$(hostname -I | awk '{print $1}')
21+
cat <<EOF >/etc/hister/config.yaml
22+
app:
23+
directory: '/opt/hister/data'
24+
server:
25+
address: '0.0.0.0:4433'
26+
base_url: 'http://${LOCAL_IP}:4433'
27+
EOF
28+
msg_ok "Configured Hister"
29+
30+
msg_info "Creating Service"
31+
cat <<EOF >/etc/systemd/system/hister.service
32+
[Unit]
33+
Description=Hister Search Engine
34+
After=network.target
35+
36+
[Service]
37+
Type=simple
38+
User=root
39+
ExecStart=/usr/local/bin/hister listen --config /etc/hister/config.yaml
40+
Restart=on-failure
41+
RestartSec=5
42+
43+
[Install]
44+
WantedBy=multi-user.target
45+
EOF
46+
systemctl enable -q --now hister
47+
msg_ok "Created Service"
48+
49+
motd_ssh
50+
customize
51+
cleanup_lxc

0 commit comments

Comments
 (0)