fixes
This commit is contained in:
parent
1f4486609b
commit
6ee3b1c05a
36
.vscode/settings.json
vendored
36
.vscode/settings.json
vendored
@ -1,5 +1,39 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"*.func": "shellscript"
|
||||
}
|
||||
},
|
||||
"files.eol": "\n",
|
||||
"files.encoding": "utf8",
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"files.insertFinalNewline": true,
|
||||
"files.autoSave": "afterDelay",
|
||||
"files.autoGuessEncoding": false,
|
||||
|
||||
"editor.detectIndentation": false,
|
||||
"editor.tabSize": 4,
|
||||
"editor.insertSpaces": true,
|
||||
"editor.wordWrap": "off",
|
||||
"editor.renderWhitespace": "boundary",
|
||||
"editor.formatOnSave": true,
|
||||
"editor.formatOnPaste": true,
|
||||
"editor.minimap.enabled": false,
|
||||
|
||||
"terminal.integrated.shell.linux": "/bin/bash",
|
||||
"terminal.integrated.scrollback": 10000,
|
||||
|
||||
"[shellscript]": {
|
||||
"editor.defaultFormatter": "foxundermoon.shell-format",
|
||||
"editor.tabSize": 4,
|
||||
"editor.insertSpaces": true
|
||||
},
|
||||
|
||||
"workbench.colorTheme": "Default Dark+",
|
||||
"workbench.iconTheme": "vscode-icons",
|
||||
|
||||
"git.autofetch": true,
|
||||
"git.confirmSync": false,
|
||||
"git.enableSmartCommit": true,
|
||||
|
||||
"extensions.ignoreRecommendations": false,
|
||||
"security.workspace.trust.untrustedFiles": "open"
|
||||
}
|
76
ct/koel.sh
76
ct/koel.sh
@ -24,45 +24,45 @@ color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/koel ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/koel ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -s 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}"
|
||||
cd /opt
|
||||
wget -q https://github.com/koel/koel/releases/download/${RELEASE}/koel-${RELEASE}.zip
|
||||
unzip -q koel-${RELEASE}.zip
|
||||
cd /opt/koel
|
||||
composer update --no-interaction >/dev/null 2>&1
|
||||
composer install --no-interaction >/dev/null 2>&1
|
||||
php artisan migrate --force >/dev/null 2>&1
|
||||
php artisan cache:clear >/dev/null 2>&1
|
||||
php artisan config:clear >/dev/null 2>&1
|
||||
php artisan view:clear >/dev/null 2>&1
|
||||
php artisan koel:init --no-interaction >/dev/null 2>&1
|
||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||
|
||||
msg_info "Starting ${APP} Service"
|
||||
systemctl start nginx
|
||||
msg_ok "Started ${APP} Service"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
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
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -s 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}"
|
||||
cd /opt
|
||||
wget -q https://github.com/koel/koel/releases/download/${RELEASE}/koel-${RELEASE}.zip
|
||||
unzip -q koel-${RELEASE}.zip
|
||||
cd /opt/koel
|
||||
composer update --no-interaction >/dev/null 2>&1
|
||||
composer install --no-interaction >/dev/null 2>&1
|
||||
php artisan migrate --force >/dev/null 2>&1
|
||||
php artisan cache:clear >/dev/null 2>&1
|
||||
php artisan config:clear >/dev/null 2>&1
|
||||
php artisan view:clear >/dev/null 2>&1
|
||||
php artisan koel:init --no-interaction >/dev/null 2>&1
|
||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||
|
||||
msg_info "Starting ${APP} Service"
|
||||
systemctl start nginx
|
||||
msg_ok "Started ${APP} Service"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
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
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
|
Loading…
x
Reference in New Issue
Block a user