File tree Expand file tree Collapse file tree 2 files changed +131
-0
lines changed
Expand file tree Collapse file tree 2 files changed +131
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ source <( curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+ # Copyright (c) 2021-2024 tteck
4+ # Author: tteck (tteckster)
5+ # License: MIT
6+ # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
7+
8+ function header_info {
9+ clear
10+ cat << "EOF "
11+ _ __
12+ | |/ /___ _ __ ___ __ _ __ _
13+ | ' // _ \| '_ ` _ \ / _` |/ _` |
14+ | . \ (_) | | | | | | (_| | (_| |
15+ |_|\_\___/|_| |_| |_|\__, |\__,_|
16+ |___/
17+ EOF
18+ }
19+ header_info
20+ echo -e " Loading..."
21+ APP=" Komga"
22+ var_disk=" 2"
23+ var_cpu=" 1"
24+ var_ram=" 2048"
25+ var_os=" debian"
26+ var_version=" 12"
27+ variables
28+ color
29+ catch_errors
30+
31+ function default_settings() {
32+ CT_TYPE=" 1"
33+ PW=" "
34+ CT_ID=$NEXTID
35+ HN=$NSAPP
36+ DISK_SIZE=" $var_disk "
37+ CORE_COUNT=" $var_cpu "
38+ RAM_SIZE=" $var_ram "
39+ BRG=" vmbr0"
40+ NET=" dhcp"
41+ GATE=" "
42+ APT_CACHER=" "
43+ APT_CACHER_IP=" "
44+ DISABLEIP6=" no"
45+ MTU=" "
46+ SD=" "
47+ NS=" "
48+ MAC=" "
49+ VLAN=" "
50+ SSH=" no"
51+ VERB=" no"
52+ echo_default
53+ }
54+
55+ function update_script() {
56+ header_info
57+ if [[ ! -d /opt/Stirling-PDF ]]; then msg_error " No ${APP} Installation Found!" ; exit ; fi
58+ msg_info " Updating ${APP} "
59+ RELEASE=$( curl -s https://api.github.com/repos/gotson/komga/releases/latest | grep " tag_name" | awk ' {print substr($2, 3, length($2)-4) }' )
60+ if [[ ! -d /opt/komga/komga-${RELEASE} ]].jar; then
61+ systemctl stop komga
62+ msg_info " Downloading ${APP} v$RELEASE "
63+ wget -q " https://github.com/gotson/komga/releases/download/v$RELEASE /komga-${RELEASE} .jar"
64+ mv komga-${RELEASE} .jar /opt/komga/komga-${RELEASE} .jar
65+ systemctl start komga
66+ fi
67+ msg_ok " Updated ${APP} to v$RELEASE "
68+ exit
69+ }
70+
71+ start
72+ build_container
73+ description
74+
75+ msg_ok " Completed Successfully!\n"
76+ echo -e " ${APP} should be reachable by going to the following URL.
77+ ${BL} http://${IP} :25600 ${CL} \n"
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Copyright (c) 2021-2024 tteck
4+ # Author: tteck (tteckster)
5+ # License: MIT
6+ # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
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+ msg_info " Installing Dependencies"
17+ $STD apt-get install -y curl
18+ $STD apt-get install -y openjdk-17-jre
19+ msg_ok " Installed Dependencies"
20+
21+ RELEASE=$( curl -s https://api.github.com/repos/gotson/komga/releases/latest | grep " tag_name" | awk ' {print substr($2, 2, length($2)-3) }' )
22+
23+ msg_info " Installing Komga"
24+ wget -q https://github.com/gotson/komga/releases/download/${RELEASE} /komga-${RELEASE} .jar
25+ mv https://github.com/gotson/komga/releases/download/${RELEASE} /komga-${RELEASE} .jar /opt/komga
26+ msg_ok " Installed TriliumNext"
27+
28+ msg_info " Creating Service"
29+ service_path=" /etc/systemd/system/komga.service"
30+
31+ echo " [Unit]
32+ Description=Komga
33+ After=syslog.target network.target
34+
35+ [Service]
36+ User=root
37+ Type=simple
38+ ExecStart=java -jar -Xmx2g komga-${RELEASE} .jar
39+ WorkingDirectory=/opt/komga/
40+ TimeoutStopSec=20
41+ Restart=always
42+
43+ [Install]
44+ WantedBy=multi-user.target" > $service_path
45+ systemctl enable --now -q komga
46+ msg_ok " Created Service"
47+
48+ motd_ssh
49+ customize
50+
51+ msg_info " Cleaning up"
52+ $STD apt-get -y autoremove
53+ $STD apt-get -y autoclean
54+ msg_ok " Cleaned"
You can’t perform that action at this time.
0 commit comments