Skip to content

Commit

Permalink
v6.29
Browse files Browse the repository at this point in the history
+ DietPi-Software | OctoPrint: Update installer to match new GitHub URL and pip install method: #3474
+ DietPi-Software | General uninstall enhencements
  • Loading branch information
MichaIng authored Apr 21, 2020
1 parent bb44eea commit b9b57ba
Showing 1 changed file with 36 additions and 16 deletions.
52 changes: 36 additions & 16 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -5583,20 +5583,17 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=bullseye\nPin-

Banner_Installing

INSTALL_URL_ADDRESS='https://github.com/foosel/OctoPrint.git'
INSTALL_URL_ADDRESS='https://github.com/OctoPrint/OctoPrint.git'
G_CHECK_URL "$INSTALL_URL_ADDRESS"

G_THREAD_START git clone "$INSTALL_URL_ADDRESS"

G_AGI libjpeg-dev

G_THREAD_WAIT
mv OctoPrint* $G_FP_DIETPI_USERDATA/octoprint
cd $G_FP_DIETPI_USERDATA/octoprint

G_DIETPI-NOTIFY 2 'OctoPrint is now installing, please be patient and do not terminate this process, it may take some time...'
G_EXEC python setup.py install

cd $G_FP_DIETPI_USERDATA/octoprint
G_EXEC pip install .
cd /tmp/$G_PROGRAM_NAME

fi
Expand Down Expand Up @@ -11597,6 +11594,8 @@ _EOF_
cat << _EOF_ > /etc/systemd/system/octoprint.service
[Unit]
Description=OctoPrint (DietPi)
Wants=network-online.target
After=network-online.target dietpi-boot.service

[Service]
ExecStart=$(command -v octoprint) serve --iknowwhatimdoing
Expand Down Expand Up @@ -13025,34 +13024,55 @@ _EOF_
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then

Banner_Uninstalling
rm -R $G_FP_DIETPI_USERDATA/octoprint
rm $(command -v octoprint)
rm -R /root/.octoprint
rm /etc/systemd/system/octoprint.service
if [[ -f '/etc/systemd/system/octoprint.service' ]]; then

systemctl disable --now octoprint
rm -R /etc/systemd/system/octoprint.service*

fi
if [[ -d $G_FP_DIETPI_USERDATA/octoprint ]]; then

if command -v pip &> /dev/null; then

cd $G_FP_DIETPI_USERDATA/octoprint
pip uninstall .
cd /tmp/$G_PROGRAM_NAME

fi
rm -R $G_FP_DIETPI_USERDATA/octoprint

fi
command -v octoprint &> /dev/null && rm $(command -v octoprint)
rm -Rf /{root,home/*}/.octoprint

fi

software_id=121 # Roon Bridge
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then

Banner_Uninstalling
rm /etc/systemd/system/roonbridge.service
rm -R /etc/roonbridge
userdel -rf roon
if [[ -f '/etc/systemd/system/roonbridge.service' ]]; then

systemctl disable --now roonbridge
rm -R /etc/systemd/system/roonbridge.service*

fi
[[ -d '/etc/roonbridge' ]] && rm -R /etc/roonbridge
getent passwd roon &> /dev/null && userdel -rf roon

fi

software_id=154 # Roon Server
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then

Banner_Uninstalling
[[ -d $G_FP_DIETPI_USERDATA/roonserver ]] && rm -R $G_FP_DIETPI_USERDATA/roonserver
if [[ -f '/etc/systemd/system/roonserver.service' ]]; then

systemctl disable --now roonserver
rm /etc/systemd/system/roonserver.service
rm -R /etc/systemd/system/roonserver.service*

fi
[[ -d $G_FP_DIETPI_USERDATA/roonserver ]] && rm -R $G_FP_DIETPI_USERDATA/roonserver

fi

Expand All @@ -13061,7 +13081,7 @@ _EOF_

Banner_Uninstalling
G_AGP steam
rm -Rf /root/.steam $G_FP_DIETPI_USERDATA/steam
rm -Rf /{root,home/*}/.steam $G_FP_DIETPI_USERDATA/steam

fi

Expand Down

0 comments on commit b9b57ba

Please sign in to comment.