mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 10:22:50 +00:00 
			
		
		
		
	* Refactor: Trilium * change name & description of trilium * finalize * Change Logo to new selfhst * Update trilium.sh --------- Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
		
			
				
	
	
		
			45 lines
		
	
	
		
			956 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			956 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
#!/usr/bin/env bash
 | 
						|
 | 
						|
# Copyright (c) 2021-2025 tteck
 | 
						|
# Author: tteck (tteckster)
 | 
						|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
						|
# Source: https://github.com/TriliumNext/Trilium
 | 
						|
 | 
						|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
 | 
						|
color
 | 
						|
verb_ip6
 | 
						|
catch_errors
 | 
						|
setting_up_container
 | 
						|
network_check
 | 
						|
update_os
 | 
						|
 | 
						|
fetch_and_deploy_gh_release "Trilium" "TriliumNext/Trilium" "prebuild" "latest" "/opt/trilium" "TriliumNotes-Server-*linux-x64.tar.xz"
 | 
						|
 | 
						|
msg_info "Creating Service"
 | 
						|
cat <<EOF >/etc/systemd/system/trilium.service
 | 
						|
[Unit]
 | 
						|
Description=Trilium Daemon
 | 
						|
After=syslog.target network.target
 | 
						|
 | 
						|
[Service]
 | 
						|
User=root
 | 
						|
Type=simple
 | 
						|
ExecStart=/opt/trilium/trilium.sh
 | 
						|
WorkingDirectory=/opt/trilium/
 | 
						|
TimeoutStopSec=20
 | 
						|
Restart=always
 | 
						|
 | 
						|
[Install]
 | 
						|
WantedBy=multi-user.target
 | 
						|
EOF
 | 
						|
systemctl enable --now -q trilium
 | 
						|
msg_ok "Created Service"
 | 
						|
 | 
						|
motd_ssh
 | 
						|
customize
 | 
						|
 | 
						|
msg_info "Cleaning up"
 | 
						|
$STD apt-get -y autoremove
 | 
						|
$STD apt-get -y autoclean
 | 
						|
msg_ok "Cleaned"
 |