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
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .meta/dietpi-survey_report
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,7 @@ shopt -s extglob
aSOFTWARE_NAME8_10[$i]=${aSOFTWARE_NAME8_9[$i]}
aSOFTWARE_NAME8_11[$i]=${aSOFTWARE_NAME8_10[$i]}
done
aSOFTWARE_NAME8_11[205]='Homer'

# Pre-create software counter array so that we can see also software (available in newest version) with 0 installs
for i in "${aSOFTWARE_NAME8_11[@]}"
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
v8.11
(2022-11-19)

New software:
- Homer | Added a simple HOMepage for your servER to keep your services on hand, with software ID 5. Many thanks to @t3dium for implementing this software title: https://github.com/MichaIng/DietPi/pull/5833

Enhancements:

Bug fixes:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ Links to hardware and software manufacturers, sources and build instructions use
- [Rclone](https://github.com/rclone/rclone)
- [ZeroTier](https://github.com/zerotier/ZeroTierOne)
- [Navidrome](https://github.com/navidrome/navidrome)
- [Homer](https://github.com/bastienwirtz/homer)

---

Expand Down
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=205
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=205 # 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=205 # 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