1
0
mirror of https://github.com/Qortal/Qortal-Hub.git synced 2025-08-06 12:31:23 +00:00
Files
docs
electron
assets
buildmac
resources
scripts
add-debian-apt-repo.sh
afterPack.js
notarize.js
uninstall-debian-conf.sh
src
.gitignore
capacitor.config.ts
electron-builder.config.arm.json
electron-builder.config.json
electron-builder.config.lin.json
electron-builder.config.mac.json
electron-builder.config.win.json
live-runner.js
package-lock.json
package.json
tsconfig.json
public
scripts
src
.eslintrc.cjs
.gitignore
.prettierignore
.prettierrc
README.md
capacitor.config.ts
index.html
package-lock.json
package.json
tsconfig.json
tsconfig.node.json
vite.config.ts
Qortal-Hub/electron/scripts/uninstall-debian-conf.sh
2024-12-25 17:58:12 +01:00

35 lines
833 B
Bash

#!/bin/bash
# Remove all conf made by Qortal Hub
# Remove apt repository source list when user uninstalls app
if grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* | grep qortal-hub.list; then
sudo rm /etc/apt/sources.list.d/qortal-hub.list;
fi
# Get the root user
if [ $SUDO_USER ];
then getSudoUser=$SUDO_USER;
else getSudoUser=`whoami`;
fi
getDesktopEntry=/home/$getSudoUser/.config/autostart/qortal-hub.desktop;
# Remove desktop entry if exists
if [ -f $getDesktopEntry ]; then
sudo rm $getDesktopEntry;
fi
# App directory which contains all the config and settings files
appDirectory=/home/$getSudoUser/.config/qortal-hub/;
if [ -d $appDirectory ]; then
sudo rm -rf $appDirectory;
fi
# Delete the link to the binary
rm -f '/usr/bin/${executable}'
# Delete run-hub
rm -f '/opt/${productFilename}/run-hub'