-
-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -974,7 +974,8 @@ Available commands: | |
aSOFTWARE_NAME[$software_id]='Homer' | ||
aSOFTWARE_DESC[$software_id]='A homepage for your services' | ||
aSOFTWARE_CATX[$software_id]=6 | ||
aSOFTWARE_DOCS[$software_id]='https://github.com/bastienwirtz/homer' | ||
aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/homepages/#Homer' | ||
aSOFTWARE_DEPS[$software_id]='nginx' | ||
This comment has been minimized.
Sorry, something went wrong. |
||
#------------------ | ||
software_id=38 | ||
aSOFTWARE_NAME[$software_id]='FreshRSS' | ||
|
@@ -12330,32 +12331,27 @@ _EOF_ | |
|
||
Banner_Installing | ||
|
||
# installing nginx and ensuring it starts at boot | ||
sudo apt install nginx -y | ||
sudo systemctl enable nginx | ||
# checking if a previous installation already exists | ||
if [ -d "/mnt/dietpi_userdata/Homer" ]; then | ||
G_DIETPI-NOTIFY 1 "IMPORTANT - previous installation found, backed up to /tmp/homer-backup and overwrote current data. To recover configs, view files at /tmp/homer-backup" | ||
G_EXEC cp -r /mnt/dietpi_userdata/Home /tmp/homer-backup | ||
fi | ||
|
||
# installing homer | ||
wget "https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip" | ||
sudo unzip homer.zip -d /mnt/dietpi_userdata/Homer/ | ||
sudo cp /usr/share/nginx/homer/assets/config.yml.dist /mnt/dietpi_userdata/Homer/assets/config.yml | ||
|
||
#create nginx config - echo line by line to conf | ||
sudo echo "server {" >> /etc/nginx/conf.d/homer.conf | ||
sudo echo " listen 49157;" >> /etc/nginx/conf.d/homer.conf | ||
sudo echo " listen [::]:49157;" >> /etc/nginx/conf.d/homer.conf | ||
sudo echo " root /mnt/dietpi_userdata/Homer/;" >> /etc/nginx/conf.d/homer.conf | ||
sudo echo " access_log /var/log/nginx/homer.access;" >> /etc/nginx/conf.d/homer.conf | ||
sudo echo " error_log /var/log/nginx/homer.error;" >> /etc/nginx/conf.d/homer.conf | ||
sudo echo "}" >> /etc/nginx/conf.d/homer.conf | ||
|
||
|
||
#fix permissions | ||
sudo chown www-data:www-data /usr/share/nginx/homer/ -R | ||
Download_Install 'https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip' /mnt/dietpi_userdata/homer | ||
G_EXEC cp /mnt/dietpi_userdata/Homer/assets/config.yml.dist /mnt/dietpi_userdata/Homer/assets/config.yml | ||
|
||
#run | ||
sudo systemctl reload nginx | ||
#create nginx config | ||
cat << '_EOF_' > /etc/nginx/conf.d/homer.conf | ||
server { | ||
listen 49157; | ||
This comment has been minimized.
Sorry, something went wrong.
Joulinar
Collaborator
|
||
listen [::]:49157; | ||
|
||
root /mnt/dietpi_userdata/Homer/; | ||
} | ||
_EOF_ | ||
|
||
echo "installed homer, you may access it from YOUR_PRIVATE_IP_HERE:49157" | ||
G_DIETPI-NOTIFY 0 "installed homer, you may access it from YOUR_PRIVATE_IP_HERE:49157" | ||
|
||
fi | ||
|
||
|
@@ -15186,15 +15182,22 @@ _EOF_ | |
|
||
Banner_Uninstalling | ||
|
||
sudo systemctl stop nginx | ||
sudo rm -rf /mnt/dietpi_userdata/Homer | ||
sudo rm /etc/nginx/conf.d/homer.conf | ||
# checking if directories exist before removing | ||
|
||
systemctl start nginx | ||
if [ -d "/mnt/dietpi_userdata/Homer" ]; then | ||
G_EXEC rm -rf /mnt/dietpi_userdata/Homer | ||
else | ||
G_DIETPI-NOTIFY 1 "/mnt/dietpi_userdata/Homer doesn't exist, skipping" | ||
This comment has been minimized.
Sorry, something went wrong.
Joulinar
Collaborator
|
||
fi | ||
|
||
# not removing nginx as it could be used for other software | ||
echo "uninstalled homer, nginx has not been removed as it may be used by other software, u can remove it manually by sudo apt remove nginx -y" | ||
if [ -d "/etc/nginx/conf.d/homer.conf" ]; then | ||
This comment has been minimized.
Sorry, something went wrong. |
||
G_EXEC rm /etc/nginx/conf.d/homer.conf | ||
else | ||
G_DIETPI-NOTIFY 1 "/etc/nginx/conf.d/homer.conf doesn't exist, skipping" | ||
fi | ||
|
||
# not removing nginx as it could be used for other software | ||
G_DIETPI-NOTIFY 0 "uninstalled homer, nginx has not been removed as it may be used by other software, u can remove it manually by sudo apt remove nginx -y" | ||
This comment has been minimized.
Sorry, something went wrong. |
||
fi | ||
|
||
software_id=158 # MinIO | ||
|
we use ID's instead of names. Have a look to our software list https://github.com/MichaIng/DietPi/wiki/DietPi-Software-list
Anyway, we prefer to install software independent from the chosen web server. Therefore, we like to use
webserver
as variable for the user choise. Check other apps that require a web server stack like NextCloud or PiHole