Function to remove zeronet
This commit is contained in:
parent
ce9091d34a
commit
7da0bb1e81
|
@ -378,6 +378,15 @@ function install_zeronet_forum {
|
||||||
echo 'install_zeronet_forum' >> $COMPLETION_FILE
|
echo 'install_zeronet_forum' >> $COMPLETION_FILE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function remove_zeronet {
|
||||||
|
if ! grep -Fxq "install_zeronet" $COMPLETION_FILE; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
${PROJECT_NAME}-mesh-install -f zeronet --remove yes
|
||||||
|
sed -i '/install_zeronet/d' $COMPLETION_FILE
|
||||||
|
sed -i '/ZeroNet /d' $COMPLETION_FILE
|
||||||
|
}
|
||||||
|
|
||||||
function install_zeronet {
|
function install_zeronet {
|
||||||
if [[ $SYSTEM_TYPE != "$VARIANT_MESH" ]]; then
|
if [[ $SYSTEM_TYPE != "$VARIANT_MESH" ]]; then
|
||||||
return
|
return
|
||||||
|
|
|
@ -668,6 +668,24 @@ function mesh_tox_client_toxic_from_repo {
|
||||||
echo "Toxic Installed."
|
echo "Toxic Installed."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function mesh_zeronet_remove {
|
||||||
|
systemctl stop zeronet
|
||||||
|
systemctl disable zeronet
|
||||||
|
systemctl stop tracker
|
||||||
|
systemctl disable tracker
|
||||||
|
$CHROOT_PREFIX apt-get -y remove --purge bittornado
|
||||||
|
if [ -f $rootdir/etc/systemd/system/zeronet.service ]; then
|
||||||
|
rm $rootdir/etc/systemd/system/zeronet.service
|
||||||
|
fi
|
||||||
|
if [ -f $rootdir/etc/systemd/system/tracker.service ]; then
|
||||||
|
rm $rootdir/etc/systemd/system/tracker.service
|
||||||
|
fi
|
||||||
|
if [ -d $rootdir$MESH_INSTALL_DIR/zeronet ]; then
|
||||||
|
rm -rf $rootdir$MESH_INSTALL_DIR/zeronet
|
||||||
|
fi
|
||||||
|
userdel -r zeronet
|
||||||
|
}
|
||||||
|
|
||||||
function mesh_zeronet {
|
function mesh_zeronet {
|
||||||
# obtain commits from the main file
|
# obtain commits from the main file
|
||||||
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
|
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
|
||||||
|
@ -1122,7 +1140,11 @@ if [[ $FN == 'tox_client' ]]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ $FN == 'zeronet' ]]; then
|
if [[ $FN == 'zeronet' ]]; then
|
||||||
|
if [[ $REMOVE != 'yes' ]]; then
|
||||||
mesh_zeronet
|
mesh_zeronet
|
||||||
|
else
|
||||||
|
mesh_zeronet_remove
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ $FN == 'qtox' ]]; then
|
if [[ $FN == 'qtox' ]]; then
|
||||||
mesh_tox_client_qtox
|
mesh_tox_client_qtox
|
||||||
|
|
Loading…
Reference in New Issue