Files
ProxmoxVE/install/memos-install.sh

48 lines
1014 B
Bash
Raw Normal View History

2024-10-30 15:25:02 +01:00
#!/usr/bin/env bash
# Copyright (c) 2021-2025 tteck
2024-10-30 15:25:02 +01:00
# Author: tteck
# Co-Author: MickLesk (Canbiz)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
2024-10-30 15:25:02 +01:00
# Source: https://github.com/usememos/memos
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
2024-10-30 15:25:02 +01:00
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
2025-07-31 14:00:31 +02:00
fetch_and_deploy_gh_release "memos" "usememos/memos" "prebuild" "latest" "/opt/memos" "memos*linux_amd64.tar.gz"
2024-10-30 15:25:02 +01:00
mkdir -p /opt/memos_data
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/memos.service
[Unit]
Description=Memos Server
After=network.target
[Service]
ExecStart=/opt/memos/memos
Environment="MEMOS_MODE=prod"
Environment="MEMOS_PORT=9030"
Environment="MEMOS_DATA=/opt/memos_data"
WorkingDirectory=/opt/memos
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now memos
2024-10-30 15:25:02 +01:00
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt -y autoremove
$STD apt -y autoclean
$STD apt -y clean
msg_ok "Cleaned"