-
-
Notifications
You must be signed in to change notification settings - Fork 92
Add Otter Wiki #801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add Otter Wiki #801
Conversation
# Source: https://github.com/redimp/otterwiki | ||
|
||
# App Default Values | ||
# Name of the app (e.g. Google, Adventurelog, Apache-Guacamole" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove all comments in this file (expect line 1-6)
# Default OS version (e.g. 12 for debian, 24.04 for ubuntu, 3.20 for alpine) | ||
var_version="${var_version:-12}" | ||
# 1 = unprivileged container, 0 = privileged container | ||
var_unprivileged="${var_unprivileged:-0}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why privileged?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meant to be unprivileged, read it wrong
|
||
# Crawling the new version and checking whether an update is required | ||
RELEASE=$(curl -fsSL https://api.github.com/repos/redimp/otterwiki/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') | ||
if [[ "${RELEASE}" != "$(cat /opt/otterwiki_version.txt)" ]] || [[ ! -f /opt/otterwiki_version.txt ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [[ "${RELEASE}" != "$(cat ~/.otterwiki 2>/dev/null)" ]] || [[ ! -f ~/.otterwiki ]]; then
tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" /opt/otterwiki/app-data /opt/otterwiki/settings.cfg | ||
msg_ok "Backup Created" | ||
|
||
# Execute Update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetch_and_deploy_gh_release "otterwiki" "redimp/otterwiki" "tarball" "latest" "/opt/otterwiki"
|
||
# Execute Update | ||
msg_info "Updating $APP to v${RELEASE}" | ||
cd /opt/otterwiki/ || exit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exit not needed
# echo "Database Name: $DB_NAME" | ||
# } >>~/"$APP_NAME".creds | ||
# msg_ok "Set up Database" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetch_and_deploy_gh_release "otterwiki" "redimp/otterwiki" "tarball" "latest" "/opt/otterwiki"
RELEASE=$(curl -fsSL https://api.github.com/repos/redimp/otterwiki/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') | ||
curl -fsSL -o "${RELEASE}.zip" "https://github.com/redimp/otterwiki/archive/refs/tags/${RELEASE}.zip" | ||
unzip -q "${RELEASE}.zip" | ||
mv "otterwiki-${RELEASE:1}/" "/opt/otterwiki" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed because fetch_and_deploy function
python3 -m venv venv | ||
./venv/bin/pip install -U pip uwsgi | ||
./venv/bin/pip install . | ||
echo "${RELEASE}" >/opt/otterwiki_version.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed because fetch_and_deploy function
[Install] | ||
WantedBy=multi-user.target | ||
EOF | ||
systemctl daemon-reload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed
|
||
# Cleanup | ||
msg_info "Cleaning up" | ||
rm -f "${RELEASE}".zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed
🛑 New scripts must first be submitted to ProxmoxVED for testing.
PRs for new scripts that skip this process will be closed.
✍️ Description
Added OtterWiki container script
🔗 Related PR / Issue
Link: #
✅ Prerequisites (X in brackets)
🛠️ Type of Change (X in brackets)
README
,AppName.md
,CONTRIBUTING.md
, or other docs.🔍 Code & Security Review (X in brackets)
Code_Audit.md
&CONTRIBUTING.md
guidelinesAppName.sh
,AppName-install.sh
,AppName.json
)📋 Additional Information (optional)