Переглянути джерело

Remove delete buttom Edit user page (#3397)

* Users can still be deleted via list users

As everything else

* Improve docs regarding rclone

* Add note about apache2 accidentally overwritten during backup
Jaap Marcus 3 роки тому
батько
коміт
81016c90dc

+ 21 - 2
docs/docs/server-administration/backup-restore.md

@@ -105,6 +105,20 @@ curl https://rclone.org/install.sh | sudo bash
 
 
 Once the download and installation is complete, run `rclone config` and then `n`. Follow the instruction on the screen, then save when completed.
 Once the download and installation is complete, run `rclone config` and then `n`. Follow the instruction on the screen, then save when completed.
 
 
+To verify if it is working run as intended:
+
+```bash
+echo "test" > /tmp/backuptest.txt
+rclone cp /tmp/backuptest.txt $HOST:$FOLDER/backuptest.txt
+rclone lsf $HOST:$FOLDER
+```
+
+And see the file has been uploaded
+
+```bash
+rclone delete $HOST:$FOLDER/backuptest.txt
+```
+
 Once the config has been saved you can setup Hestia with the following command:
 Once the config has been saved you can setup Hestia with the following command:
 
 
 ```bash
 ```bash
@@ -112,7 +126,12 @@ v-add-backup-host 'rclone' 'remote-name' '' '' 'Bucket or Folder name' ''
 ```
 ```
 
 
 ::: tip
 ::: tip
-B2 requires you to setup a bucket during the `v-add-backup-host` stage. S3 or R2 storage will work fine during the `rclone config` stage.
+Configuration per endpoint might be different! Make sure to test it is working before relying on it. To verify it works run
+
+```bash
+v-backup-user admin
+```
+
 :::
 :::
 
 
 For example:
 For example:
@@ -130,7 +149,7 @@ r2 s3
 To use the "R2" endpoint use
 To use the "R2" endpoint use
 
 
 ```bash
 ```bash
-v-add-backup-host 'rclone' 'r2'
+v-add-backup-host 'rclone' 'r2' '' '' 'folder'
 ```
 ```
 
 
 For Blackblaze use
 For Blackblaze use

+ 27 - 0
docs/docs/server-administration/troubleshooting.md

@@ -28,3 +28,30 @@ v-change-user-config-value admin LOGIN_ALLOW_IPS ''
 ## Can I update my cronjobs via `crontab -e`?
 ## Can I update my cronjobs via `crontab -e`?
 
 
 No, you cannot. When you update HestiaCP, the crontab will simply get overwritten. The changes will not get saved in backups either.
 No, you cannot. When you update HestiaCP, the crontab will simply get overwritten. The changes will not get saved in backups either.
+
+## After update Apache2 I am not able to restart Apache2 or Nginx
+
+The error message states (98) Address already in use: AG0072: make_sock: could not bind to address 0.0.0.0:80
+
+When a package update sometimes comes with a new config and probally it has been overwritten...
+
+```batch
+Configuration file '/etc/apache2/apache2.conf'
+ ==> Modified (by you or by a script) since installation.
+ ==> Package distributor has shipped an updated version.
+   What would you like to do about it ?  Your options are:
+	Y or I  : install the package maintainer's version
+	N or O  : keep your currently-installed version
+	  D     : show the differences between the versions
+	  Z     : start a shell to examine the situation
+ The default action is to keep your current version.
+*** apache2.conf (Y/I/N/O/D/Z) [default=N] ?
+```
+
+If you see this message **ALWAYS** press "N" or **ENTER** to select the default value!
+
+How ever if you entered Y or I. Then replace the config that can be found in /root/hst_backups/xxxxx/conf/apache2/ folder and copy over apache2.conf and ports.conf to /etc/apache2/ folder
+
+xxxxxx is the date/time the backup is made during the last update of HestiaCP
+
+If you don't have have a backup made you can also copy the config in /usr/local/hestia/install/deb/apache2/apache2.conf to /etc/apache2.conf and also empty /etc/apache2/ports.conf

+ 0 - 15
web/templates/pages/edit_user.php

@@ -33,21 +33,6 @@
 			<?php } ?>
 			<?php } ?>
 		</div>
 		</div>
 		<div class="toolbar-buttons">
 		<div class="toolbar-buttons">
-			<?php if ($_SESSION["user"] == $v_username || isset($_SESSION["look"])) { ?>
-				<!-- Do not show delete button for currently logged in user-->
-			<?} else {?>
-				<a href="/login/?loginas=<?= htmlentities($v_username) ?>&token=<?= $_SESSION["token"] ?>" class="button button-secondary" id="btn-create" title="<?= _("login as") ?>">
-					<i class="fas fa-right-to-bracket icon-maroon"></i><?= _("login as") ?>
-				</a>
-				<a class="data-controls do_delete button button-secondary button-danger">
-					<i class="do_delete fas fa-circle-xmark icon-red"></i>
-					<?= _("Delete") ?>
-					<input type="hidden" name="delete_url" value="/delete/user/?user=<?= htmlentities($v_username) ?>&token=<?= $_SESSION["token"] ?>">
-					<div class="dialog js-confirm-dialog-delete" title="<?= _("Confirmation") ?>">
-						<p><?= sprintf(_("DELETE_USER_CONFIRMATION"), htmlentities($v_username)) ?></p>
-					</div>
-				</a>
-			<?php } ?>
 			<button type="submit" class="button" form="vstobjects">
 			<button type="submit" class="button" form="vstobjects">
 				<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
 				<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
 			</button>
 			</button>