mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-30 22:19:41 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2b7af21fe |
+57
@@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/ShokoAnime/ShokoServer
|
||||
|
||||
APP="Shoko"
|
||||
var_tags="${var_tags:-media;anime}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-10}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-no}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/shoko ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "shoko" "ShokoAnime/ShokoServer"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop shoko
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "shoko" "ShokoAnime/ShokoServer" "prebuild" "latest" "/opt/shoko" "Shoko.CLI_Framework_any-x64.zip"
|
||||
chmod +x /opt/shoko/Shoko.CLI
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start shoko
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
|
||||
echo -e "${GATEWAY}${BGN}http://${IP}:8111${CL}"
|
||||
@@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/ShokoAnime/ShokoServer
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
mediainfo \
|
||||
"$(apt-cache show librhash1 &>/dev/null && echo librhash1 || echo librhash0)"
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
DOTNET_VERSION="8" DOTNET_TYPE="aspnetcore" setup_dotnet
|
||||
|
||||
fetch_and_deploy_gh_release "shoko" "ShokoAnime/ShokoServer" "prebuild" "latest" "/opt/shoko" "Shoko.CLI_Framework_any-x64.zip"
|
||||
|
||||
msg_info "Creating Service"
|
||||
mkdir -p /opt/shoko_data
|
||||
chmod +x /opt/shoko/Shoko.CLI
|
||||
cat <<EOF >/etc/systemd/system/shoko.service
|
||||
[Unit]
|
||||
Description=Shoko Server
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/shoko
|
||||
Environment=HOME=/opt/shoko_data
|
||||
Environment=DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
ExecStart=/opt/shoko/Shoko.CLI
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now shoko
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
Reference in New Issue
Block a user