Skip to content
This repository was archived by the owner on Nov 2, 2024. It is now read-only.

Commit

Permalink
Update commafeed-install.sh
Browse files Browse the repository at this point in the history
refactor
closes #3551
  • Loading branch information
tteck authored Aug 19, 2024
1 parent 28085bb commit 0a33d17
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions install/commafeed-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ $STD apt-get update
$STD apt-get -y install zulu17-jdk
msg_ok "Installed Azul Zulu"

msg_info "Installing CommaFeed"
mkdir /opt/commafeed && cd /opt/commafeed
wget -q https://github.com/Athou/commafeed/releases/latest/download/commafeed.jar
wget -q https://github.com/Athou/commafeed/releases/latest/download/config.yml.example -O config.yml
msg_ok "Installed CommaFeed"
RELEASE=$(curl -sL https://api.github.com/repos/Athou/commafeed/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
msg_info "Installing CommaFeed ${RELEASE}"
mkdir /opt/commafeed
wget -q https://github.com/Athou/commafeed/releases/download/${RELEASE}/commafeed-${RELEASE}-h2-jvm.zip
unzip -q commafeed-${RELEASE}-h2-jvm.zip
mv commafeed-${RELEASE}-h2/* /opt/commafeed/
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed CommaFeed ${RELEASE}"

msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/commafeed.service
Expand All @@ -40,7 +43,7 @@ Description=CommaFeed Service
After=network.target
[Service]
ExecStart=/usr/bin/java -Djava.net.preferIPv4Stack=true -jar /opt/commafeed/commafeed.jar server /opt/commafeed/config.yml
ExecStart=java -jar quarkus-run.jar
WorkingDirectory=/opt/commafeed/
Restart=always
Expand All @@ -54,7 +57,7 @@ motd_ssh
customize

msg_info "Cleaning up"
rm -rf zulu-repo_1.0.0-3_all.deb
rm -rf commafeed-${RELEASE}-h2 commafeed-${RELEASE}-h2-jvm.zip zulu-repo_1.0.0-3_all.deb
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

0 comments on commit 0a33d17

Please sign in to comment.