mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-11-22 05:25:15 +00:00
Replaces manual apt cleanup commands with a unified cleanup_lxc function across install scripts. Updates apt-get to apt for package installation, improves repository setup logic, and standardizes service creation. Minor messaging and variable usage improvements for consistency.
63 lines
1.4 KiB
Bash
63 lines
1.4 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# Copyright (c) 2021-2025 community-scripts ORG
|
|
# Author: kristocopani
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
# Source: https://github.com/glanceapp/glance
|
|
|
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
color
|
|
verb_ip6
|
|
catch_errors
|
|
setting_up_container
|
|
network_check
|
|
update_os
|
|
|
|
fetch_and_deploy_gh_release "glance" "glanceapp/glance" "prebuild" "latest" "/opt/glance" "glance-linux-amd64.tar.gz"
|
|
|
|
msg_info "Configuring Glance"
|
|
cat <<EOF >/opt/glance/glance.yml
|
|
pages:
|
|
- name: Startpage
|
|
width: slim
|
|
hide-desktop-navigation: true
|
|
center-vertically: true
|
|
columns:
|
|
- size: full
|
|
widgets:
|
|
- type: search
|
|
autofocus: true
|
|
- type: bookmarks
|
|
groups:
|
|
- title: General
|
|
links:
|
|
- title: Google
|
|
url: https://www.google.com/
|
|
- title: Helper Scripts
|
|
url: https://github.com/community-scripts/ProxmoxVE
|
|
EOF
|
|
msg_ok "Configured Glance"
|
|
|
|
msg_info "Creating Service"
|
|
cat <<EOF >/etc/systemd/system/glance.service
|
|
Description=Glance Daemon
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
WorkingDirectory=/opt/glance
|
|
ExecStart=/opt/glance/glance --config /opt/glance/glance.yml
|
|
TimeoutStopSec=20
|
|
KillMode=process
|
|
Restart=on-failure
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
EOF
|
|
systemctl enable -q --now glance
|
|
msg_ok "Created Service"
|
|
|
|
motd_ssh
|
|
customize
|
|
cleanup_lxc
|