fixes
This commit is contained in:
parent
7f0319f756
commit
ae5c23318f
84
ct/koel.sh
84
ct/koel.sh
@ -1,17 +1,17 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func)
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||||
# Copyright (c) 2021-2025 community-scripts ORG
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
# Author: MickLesk (Canbiz)
|
# Author: MickLesk (CanbiZ)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||||
|
# Source: https://koel.dev/
|
||||||
|
|
||||||
## App Default Values
|
|
||||||
APP="Koel"
|
APP="Koel"
|
||||||
var_tags="${var_tags:-music}"
|
var_tags="${var_tags:-music;streaming}"
|
||||||
var_disk="${var_disk:-9}"
|
var_cpu="${var_cpu:-2}"
|
||||||
var_cpu="${var_cpu:-3}"
|
var_ram="${var_ram:-2048}"
|
||||||
var_ram="${var_ram:-3072}"
|
var_disk="${var_disk:-8}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-12}"
|
var_version="${var_version:-13}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
@ -23,40 +23,52 @@ function update_script() {
|
|||||||
header_info
|
header_info
|
||||||
check_container_storage
|
check_container_storage
|
||||||
check_container_resources
|
check_container_resources
|
||||||
|
|
||||||
if [[ ! -d /opt/koel ]]; then
|
if [[ ! -d /opt/koel ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/koel/koel/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
|
||||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
|
||||||
msg_info "Stopping ${APP} Service"
|
|
||||||
systemctl stop nginx
|
|
||||||
msg_ok "Stopped ${APP} Service"
|
|
||||||
|
|
||||||
msg_info "Updating ${APP} to v${RELEASE}"
|
if check_for_gh_release "koel" "koel/koel"; then
|
||||||
cd /opt
|
msg_info "Stopping Services"
|
||||||
curl -fsSL https://github.com/koel/koel/releases/download/${RELEASE}/koel-${RELEASE}.zip
|
systemctl stop nginx php8.4-fpm
|
||||||
unzip -q koel-${RELEASE}.zip
|
msg_ok "Stopped Services"
|
||||||
|
|
||||||
|
msg_info "Creating Backup"
|
||||||
|
mkdir -p /tmp/koel_backup
|
||||||
|
cp /opt/koel/.env /tmp/koel_backup/
|
||||||
|
cp -r /opt/koel/storage /tmp/koel_backup/ 2>/dev/null || true
|
||||||
|
msg_ok "Created Backup"
|
||||||
|
|
||||||
|
msg_info "Updating ${APP}"
|
||||||
|
rm -rf /opt/koel/app /opt/koel/config /opt/koel/resources /opt/koel/routes
|
||||||
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "koel" "koel/koel" "prebuild" "latest" "/opt/koel" "koel-*.tar.gz"
|
||||||
|
msg_ok "Updated ${APP}"
|
||||||
|
|
||||||
|
msg_info "Restoring Data"
|
||||||
|
cp /tmp/koel_backup/.env /opt/koel/
|
||||||
|
cp -r /tmp/koel_backup/storage/* /opt/koel/storage/ 2>/dev/null || true
|
||||||
|
rm -rf /tmp/koel_backup
|
||||||
|
msg_ok "Restored Data"
|
||||||
|
|
||||||
|
msg_info "Running Migrations"
|
||||||
cd /opt/koel
|
cd /opt/koel
|
||||||
composer update --no-interaction >/dev/null 2>&1
|
export COMPOSER_ALLOW_SUPERUSER=1
|
||||||
composer install --no-interaction >/dev/null 2>&1
|
$STD composer install --no-interaction --no-dev --optimize-autoloader
|
||||||
php artisan migrate --force >/dev/null 2>&1
|
$STD php artisan migrate --force
|
||||||
php artisan cache:clear >/dev/null 2>&1
|
$STD php artisan config:clear
|
||||||
php artisan config:clear >/dev/null 2>&1
|
$STD php artisan cache:clear
|
||||||
php artisan view:clear >/dev/null 2>&1
|
$STD php artisan view:clear
|
||||||
php artisan koel:init --no-interaction >/dev/null 2>&1
|
$STD php artisan koel:init --no-assets --no-interaction
|
||||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
chown -R www-data:www-data /opt/koel
|
||||||
|
chmod -R 775 /opt/koel/storage
|
||||||
|
msg_ok "Ran Migrations"
|
||||||
|
|
||||||
msg_info "Starting ${APP} Service"
|
msg_info "Starting Services"
|
||||||
systemctl start nginx
|
systemctl start php8.4-fpm nginx
|
||||||
msg_ok "Started ${APP} Service"
|
msg_ok "Started Services"
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_ok "Updated Successfully"
|
||||||
rm -rf /opt/koel-${RELEASE}.zip
|
|
||||||
msg_ok "Cleaned"
|
|
||||||
msg_ok "Updated Successfully!\n"
|
|
||||||
else
|
|
||||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
|
||||||
fi
|
fi
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
@ -68,4 +80,4 @@ description
|
|||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:6767${CL}"
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
|
||||||
|
|||||||
52
frontend/public/json/koel.json
Normal file
52
frontend/public/json/koel.json
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
"name": "Koel",
|
||||||
|
"slug": "koel",
|
||||||
|
"categories": [
|
||||||
|
13
|
||||||
|
],
|
||||||
|
"date_created": "2024-06-15",
|
||||||
|
"type": "ct",
|
||||||
|
"updateable": true,
|
||||||
|
"privileged": false,
|
||||||
|
"interface_port": 80,
|
||||||
|
"documentation": "https://docs.koel.dev/",
|
||||||
|
"config_path": "/opt/koel/.env",
|
||||||
|
"website": "https://koel.dev/",
|
||||||
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/koel.svg",
|
||||||
|
"description": "Koel is a simple web-based personal audio streaming service written in Vue and Laravel. It supports multiple users, audio visualization, smart playlists, YouTube integration, and Last.fm scrobbling.",
|
||||||
|
"install_methods": [
|
||||||
|
{
|
||||||
|
"type": "default",
|
||||||
|
"script": "ct/koel.sh",
|
||||||
|
"resources": {
|
||||||
|
"cpu": 2,
|
||||||
|
"ram": 2048,
|
||||||
|
"hdd": 8,
|
||||||
|
"os": "Debian",
|
||||||
|
"version": "13"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_credentials": {
|
||||||
|
"username": null,
|
||||||
|
"password": null
|
||||||
|
},
|
||||||
|
"notes": [
|
||||||
|
{
|
||||||
|
"text": "First visit will prompt you to create an admin account",
|
||||||
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "Media files should be placed in /opt/koel_media",
|
||||||
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "Database credentials are stored in ~/koel.creds",
|
||||||
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "Music library is scanned hourly via cron job",
|
||||||
|
"type": "info"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 communtiy-scripts ORG
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
# Author: MickLesk (Canbiz)
|
# Author: MickLesk (CanbiZ)
|
||||||
# License: MIT
|
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# Source: https://koel.dev/
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@ -13,135 +13,172 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
PG_VERSION="16" setup_postgresql
|
msg_info "Installing Dependencies"
|
||||||
PHP_VERSION=8.3 PHP_MODULE="bcmath,bz2,cli,exif,common,curl,fpm,gd,imagick,intl,mbstring,pgsql,sqlite3,xml,xmlrpc,zip" setup_php
|
|
||||||
NODE_VERSION=22 NODE_MODULE="yarn,npm@latest" setup_nodejs
|
|
||||||
setup_composer
|
|
||||||
|
|
||||||
msg_info "Installing Dependencies (Patience)"
|
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
nginx \
|
nginx \
|
||||||
apt-transport-https \
|
|
||||||
lsb-release \
|
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
cron \
|
cron \
|
||||||
libapache2-mod-xsendfile \
|
locales
|
||||||
libzip-dev \
|
$STD sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen
|
||||||
locales \
|
$STD locale-gen en_US.UTF-8
|
||||||
libpng-dev \
|
export LANG=en_US.UTF-8
|
||||||
libjpeg62-turbo-dev \
|
export LC_ALL=en_US.UTF-8
|
||||||
libpq-dev \
|
|
||||||
libwebp-dev
|
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
# PG_VERSION="16" setup_postgresql
|
import_local_ip
|
||||||
# PHP_VERSION=8.3 PHP_MODULE="bcmath,bz2,cli,exif,common,curl,fpm,gd,imagick,intl,mbstring,pgsql,sqlite3,xml,xmlrpc,zip" setup_php
|
PG_VERSION="16" setup_postgresql
|
||||||
# NODE_VERSION=22 NODE_MODULE="yarn,npm@latest" setup_nodejs
|
PG_DB_NAME="koel" PG_DB_USER="koel" setup_postgresql_db
|
||||||
# setup_composer
|
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="bz2,exif,imagick,pgsql,sqlite3" setup_php
|
||||||
|
NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs
|
||||||
|
setup_composer
|
||||||
|
|
||||||
msg_info "Setting up PostgreSQL Database"
|
fetch_and_deploy_gh_release "koel" "koel/koel" "prebuild" "latest" "/opt/koel" "koel-*.tar.gz"
|
||||||
DB_NAME=koel_db
|
|
||||||
DB_USER=koel
|
msg_info "Configuring Koel"
|
||||||
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
mkdir -p /opt/koel_media /opt/koel_sync
|
||||||
APP_SECRET=$(openssl rand -base64 32)
|
cd /opt/koel
|
||||||
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
APP_KEY=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)
|
||||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
cat <<EOF >/opt/koel/.env
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
APP_NAME=Koel
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
|
APP_ENV=production
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
APP_DEBUG=false
|
||||||
{
|
APP_URL=http://${LOCAL_IP}
|
||||||
echo "Koel-Credentials"
|
APP_KEY=base64:${APP_KEY}
|
||||||
echo "Koel Database User: $DB_USER"
|
|
||||||
echo "Koel Database Password: $DB_PASS"
|
TRUSTED_HOSTS=
|
||||||
echo "Koel Database Name: $DB_NAME"
|
|
||||||
} >>~/koel.creds
|
DB_CONNECTION=pgsql
|
||||||
msg_ok "Set up PostgreSQL Database"
|
DB_HOST=127.0.0.1
|
||||||
|
DB_PORT=5432
|
||||||
|
DB_DATABASE=${PG_DB_NAME}
|
||||||
|
DB_USERNAME=${PG_DB_USER}
|
||||||
|
DB_PASSWORD=${PG_DB_PASS}
|
||||||
|
|
||||||
|
STORAGE_DRIVER=local
|
||||||
|
MEDIA_PATH=/opt/koel_media
|
||||||
|
ARTIFACTS_PATH=
|
||||||
|
|
||||||
|
IGNORE_DOT_FILES=true
|
||||||
|
APP_MAX_SCAN_TIME=600
|
||||||
|
MEMORY_LIMIT=
|
||||||
|
|
||||||
|
STREAMING_METHOD=php
|
||||||
|
SCOUT_DRIVER=tntsearch
|
||||||
|
|
||||||
|
USE_MUSICBRAINZ=true
|
||||||
|
MUSICBRAINZ_USER_AGENT=
|
||||||
|
|
||||||
|
LASTFM_API_KEY=
|
||||||
|
LASTFM_API_SECRET=
|
||||||
|
|
||||||
|
SPOTIFY_CLIENT_ID=
|
||||||
|
SPOTIFY_CLIENT_SECRET=
|
||||||
|
|
||||||
|
YOUTUBE_API_KEY=
|
||||||
|
|
||||||
|
CDN_URL=
|
||||||
|
|
||||||
|
TRANSCODE_FLAC=false
|
||||||
|
FFMPEG_PATH=/usr/bin/ffmpeg
|
||||||
|
TRANSCODE_BIT_RATE=128
|
||||||
|
|
||||||
|
ALLOW_DOWNLOAD=true
|
||||||
|
BACKUP_ON_DELETE=true
|
||||||
|
|
||||||
|
MEDIA_BROWSER_ENABLED=false
|
||||||
|
|
||||||
|
PROXY_AUTH_ENABLED=false
|
||||||
|
|
||||||
|
SYNC_LOG_LEVEL=error
|
||||||
|
FORCE_HTTPS=
|
||||||
|
|
||||||
|
MAIL_FROM_ADDRESS="noreply@localhost"
|
||||||
|
MAIL_FROM_NAME="Koel"
|
||||||
|
MAIL_MAILER=log
|
||||||
|
MAIL_HOST=null
|
||||||
|
MAIL_PORT=null
|
||||||
|
MAIL_USERNAME=null
|
||||||
|
MAIL_PASSWORD=null
|
||||||
|
MAIL_ENCRYPTION=null
|
||||||
|
|
||||||
|
BROADCAST_CONNECTION=log
|
||||||
|
CACHE_DRIVER=file
|
||||||
|
FILESYSTEM_DISK=local
|
||||||
|
QUEUE_CONNECTION=sync
|
||||||
|
SESSION_DRIVER=file
|
||||||
|
SESSION_LIFETIME=120
|
||||||
|
EOF
|
||||||
|
|
||||||
|
mkdir -p /opt/koel/storage/{app/public,framework/{cache/data,sessions,views},logs}
|
||||||
|
chown -R www-data:www-data /opt/koel /opt/koel_media /opt/koel_sync
|
||||||
|
chmod -R 775 /opt/koel/storage /opt/koel/bootstrap/cache
|
||||||
|
msg_ok "Configured Koel"
|
||||||
|
|
||||||
msg_info "Installing Koel (Patience)"
|
msg_info "Installing Koel (Patience)"
|
||||||
RELEASE=$(curl -fsSL https://github.com/koel/koel/releases/latest | grep "title>Release" | cut -d " " -f 4)
|
export COMPOSER_ALLOW_SUPERUSER=1
|
||||||
mkdir -p /opt/koel_{media,sync}
|
|
||||||
curl -fsSL https://github.com/koel/koel/releases/download/${RELEASE}/koel-${RELEASE}.zip -o /opt/koel.zip
|
|
||||||
cd /opt
|
|
||||||
unzip koel.zip
|
|
||||||
cd /opt/koel
|
cd /opt/koel
|
||||||
mv .env.example .env
|
$STD composer install --no-interaction --no-dev --optimize-autoloader
|
||||||
$STD composer install --no-interaction
|
$STD php artisan config:clear
|
||||||
sed -i -e "s/DB_CONNECTION=.*/DB_CONNECTION=pgsql/" \
|
$STD php artisan cache:clear
|
||||||
-e "s/DB_HOST=.*/DB_HOST=localhost/" \
|
$STD php artisan koel:init --no-assets --no-interaction
|
||||||
-e "s/DB_DATABASE=.*/DB_DATABASE=$DB_NAME/" \
|
chown -R www-data:www-data /opt/koel
|
||||||
-e "s/DB_PORT=.*/DB_PORT=5432/" \
|
|
||||||
-e "s|APP_KEY=.*|APP_KEY=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)|" \
|
|
||||||
-e "s/DB_USERNAME=.*/DB_USERNAME=$DB_USER/" \
|
|
||||||
-e "s|DB_PASSWORD=.*|DB_PASSWORD=$DB_PASS|" \
|
|
||||||
-e "s|MEDIA_PATH=.*|MEDIA_PATH=/opt/koel_media|" \
|
|
||||||
-e "s|FFMPEG_PATH=/usr/local/bin/ffmpeg|FFMPEG_PATH=/usr/bin/ffmpeg|" /opt/koel/.env
|
|
||||||
php artisan koel:init --no-assets
|
|
||||||
chown -R :www-data /opt/*
|
|
||||||
chmod -R g+r /opt/*
|
|
||||||
chmod -R g+rw /opt/*
|
|
||||||
chown -R www-data:www-data /opt/*
|
|
||||||
chmod -R 755 /opt/*
|
|
||||||
msg_ok "Installed Koel"
|
msg_ok "Installed Koel"
|
||||||
|
|
||||||
msg_info "Set up web services"
|
msg_info "Configuring Nginx"
|
||||||
cat <<EOF >/etc/nginx/sites-available/koel
|
cat <<'EOF' >/etc/nginx/sites-available/koel
|
||||||
server {
|
server {
|
||||||
listen *:80;
|
listen 80;
|
||||||
server_name koel.local;
|
server_name _;
|
||||||
root /opt/koel/public;
|
root /opt/koel/public;
|
||||||
index index.php;
|
index index.php;
|
||||||
|
|
||||||
|
client_max_body_size 50M;
|
||||||
|
charset utf-8;
|
||||||
|
|
||||||
gzip on;
|
gzip on;
|
||||||
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/json;
|
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/json;
|
||||||
gzip_comp_level 9;
|
gzip_comp_level 9;
|
||||||
|
|
||||||
send_timeout 3600;
|
send_timeout 3600;
|
||||||
client_max_body_size 200M;
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files \$uri \$uri/ /index.php?\$args;
|
try_files $uri $uri/ /index.php?$args;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /media/ {
|
location /media/ {
|
||||||
alias /opt/koel_media;
|
internal;
|
||||||
autoindex on;
|
alias $upstream_http_x_media_root;
|
||||||
access_log /var/log/nginx/koel.access.log;
|
|
||||||
error_log /var/log/nginx/koel.error.log;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
try_files \$uri \$uri/ /index.php?\$args;
|
try_files $uri $uri/ /index.php?$args;
|
||||||
|
fastcgi_pass unix:/run/php/php8.4-fpm.sock;
|
||||||
fastcgi_param PATH_INFO \$fastcgi_path_info;
|
|
||||||
fastcgi_param PATH_TRANSLATED \$document_root\$fastcgi_path_info;
|
|
||||||
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
|
|
||||||
|
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
||||||
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
|
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
|
fastcgi_intercept_errors on;
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ /\.(?!well-known).* {
|
||||||
|
deny all;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
ln -s /etc/nginx/sites-available/koel /etc/nginx/sites-enabled/koel
|
rm -f /etc/nginx/sites-enabled/default
|
||||||
systemctl restart php8.3-fpm
|
ln -sf /etc/nginx/sites-available/koel /etc/nginx/sites-enabled/koel
|
||||||
systemctl reload nginx
|
$STD systemctl reload nginx
|
||||||
msg_ok "Created Services"
|
msg_ok "Configured Nginx"
|
||||||
|
|
||||||
msg_info "Adding Cronjob (Daily Midnight)"
|
msg_info "Setting up Cron Job"
|
||||||
cat <<EOF >/opt/koel_sync/koel_sync.cron
|
cat <<'EOF' >/etc/cron.d/koel
|
||||||
0 0 * * * cd /opt/koel/ && /usr/bin/php artisan koel:sync >/opt/koel_sync/koel_sync.log 2>&1
|
0 * * * * www-data cd /opt/koel && /usr/bin/php artisan koel:scan >/dev/null 2>&1
|
||||||
EOF
|
EOF
|
||||||
crontab /opt/koel_sync/koel_sync.cron
|
chmod 644 /etc/cron.d/koel
|
||||||
|
msg_ok "Set up Cron Job"
|
||||||
msg_ok "Cronjob successfully added"
|
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
cleanup_lxc
|
||||||
msg_info "Cleaning up"
|
|
||||||
rm -rf /opt/koel.zip
|
|
||||||
$STD apt-get autoremove
|
|
||||||
$STD apt-get autoclean
|
|
||||||
msg_ok "Cleaned"
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user