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 20 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
47 changes: 47 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,30 @@ _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

# Download the latest release
Download_Install 'https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip' homer

# 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 rm -R /mnt/dietpi_userdata/homer_backup
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}
fi

# Install latest release, preserve existing config
G_EXEC cp -a homer/. /var/www/homer/
G_EXEC rm -R homer
[[ -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 +15171,22 @@ _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
if [[ -f '/mnt/dietpi_userdata/homer_backup' ]]
then
if G_WHIP_BUTTON_CANCEL_TEXT='Keep it' G_WHIP_YESNO 'Do you want to remove the Homer backup at /mnt/dietpi_userdata/homer_backup as well?'
then
G_EXEC rm -R /mnt/dietpi_userdata/homer_backup
else
G_DIETPI-NOTIFY 2 'Leaving Homer backup at /mnt/dietpi_userdata/homer_backup in place'
fi
fi
fi

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