Skip to content
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

DietPi-Software | Add Homer dashboard #5833

Merged
merged 21 commits into from
Nov 1, 2022
Merged
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,13 @@ Available commands:
aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/social/#wordpress'
aSOFTWARE_DEPS[$software_id]='88 89 webserver'
#------------------
software_id=206
aSOFTWARE_NAME[$software_id]='Homer'
aSOFTWARE_DESC[$software_id]='Simple HOMepage for your servER to keep your services on hand'
MichaIng marked this conversation as resolved.
Show resolved Hide resolved
aSOFTWARE_CATX[$software_id]=6
aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/social/#homer'
aSOFTWARE_DEPS[$software_id]='webserver'
#------------------
software_id=38
aSOFTWARE_NAME[$software_id]='FreshRSS'
aSOFTWARE_DESC[$software_id]='self-hosted RSS feed aggregator'
Expand Down Expand Up @@ -12318,6 +12325,27 @@ _EOF_
Download_Install "$(curl -sSfL 'https://api.github.com/repos/rclone/rclone/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/rclone-v[^\"\/]*linux-$arch.deb\"/{print \$4}")"

fi

software_id=206 # Homer
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 ))
then
Banner_Installing

# Backup existing instance
if [[ -d '/var/www/homer' ]]
then
G_DIETPI-NOTIFY 2 'Existing Homer instance found, backing up to /mnt/dietpi_userdata/homer_backup ...'
[[ -d '/mnt/dietpi_userdata/homer_backup' ]] || G_EXEC mkdir /mnt/dietpi_userdata/homer_backup
[[ -d '/mnt/dietpi_userdata/homer_backup/resources' ]] && G_EXEC rm -Rf /mnt/dietpi_userdata/homer_backup/{workbox-*.js,resources}
G_EXEC cp -a /var/www/homer/. /mnt/dietpi_userdata/homer_backup/
G_DIETPI-NOTIFY 2 'Removing old assets with hash in file name ...'
G_EXEC rm -Rf /var/www/homer/{workbox-*.js,resources}
MichaIng marked this conversation as resolved.
Show resolved Hide resolved
fi

# Install latest release, preserve existing config
Download_Install 'https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip' /var/www/homer
MichaIng marked this conversation as resolved.
Show resolved Hide resolved
[[ -f '/var/www/homer/assets/config.yml' ]] || G_EXEC cp /var/www/homer/assets/config.yml{.dist,}
fi

software_id=198 # File Browser
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then
Expand Down Expand Up @@ -15140,6 +15168,13 @@ _EOF_
[[ -d '/var/lib/pijuice' ]] && G_EXEC rm -R /var/lib/pijuice

fi

software_id=206 # Homer
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 ))
then
Banner_Uninstalling
[[ -d '/var/www/homer' ]] && G_EXEC rm -R /var/www/homer
MichaIng marked this conversation as resolved.
Show resolved Hide resolved
fi

software_id=158 # MinIO
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then
Expand Down