updates
This commit is contained in:
@@ -59,6 +59,7 @@ ALL ALL=(ALL) NOPASSWD: /usr/bin/nmcli, /usr/sbin/reboot
|
||||
www-data ALL=(ALL) NOPASSWD: /usr/bin/git pull
|
||||
www-data ALL=(ALL) NOPASSWD: /usr/bin/ssh
|
||||
www-data ALL=(ALL) NOPASSWD: /usr/bin/python3 *
|
||||
www-data ALL=(ALL) NOPASSWD: /bin/systemctl *
|
||||
```
|
||||
## Serial
|
||||
|
||||
|
||||
@@ -180,36 +180,39 @@
|
||||
|
||||
<!-- SYSTEMD SERVICES SECTION -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-12">
|
||||
<h3 class="mt-4">SystemD Services</h3>
|
||||
<div id="services-table">
|
||||
<div class="d-flex justify-content-end mb-3">
|
||||
<button type="button" class="btn btn-primary" onclick="refreshServices()">
|
||||
<svg width="16" height="16" fill="currentColor" class="bi bi-arrow-clockwise" viewBox="0 0 16 16">
|
||||
<div class="col-lg-8 col-12">
|
||||
<h4 class="mt-4">SystemD Services</h4>
|
||||
<div id="services-table" class="card">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<span class="fw-bold">Service Status</span>
|
||||
<button type="button" class="btn btn-sm btn-outline-primary" onclick="refreshServices()">
|
||||
<svg width="14" height="14" fill="currentColor" class="bi bi-arrow-clockwise" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z"/>
|
||||
<path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z"/>
|
||||
</svg>
|
||||
Refresh
|
||||
</button>
|
||||
</div>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<div class="card-body p-0">
|
||||
<table class="table table-sm table-hover mb-0">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>Service</th>
|
||||
<th>Status</th>
|
||||
<th>Enabled</th>
|
||||
<th>Actions</th>
|
||||
<th style="width: 30%">Service</th>
|
||||
<th style="width: 15%">Status</th>
|
||||
<th style="width: 15%">Enabled</th>
|
||||
<th style="width: 40%">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="services-tbody">
|
||||
<tr>
|
||||
<td colspan="4" class="text-center">Loading services...</td>
|
||||
<td colspan="4" class="text-center py-3">Loading services...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- toast -->
|
||||
|
||||
@@ -100,7 +100,7 @@ fi
|
||||
# Add sudo authorization (prevent duplicate entries)
|
||||
info "Setting up sudo authorization..."
|
||||
if ! sudo grep -q "/usr/bin/nmcli" /etc/sudoers; then
|
||||
echo -e "ALL ALL=(ALL) NOPASSWD: /usr/bin/nmcli, /usr/sbin/reboot\nwww-data ALL=(ALL) NOPASSWD: /usr/bin/git pull\nwww-data ALL=(ALL) NOPASSWD: /usr/bin/ssh\nwww-data ALL=(ALL) NOPASSWD: /usr/bin/python3 *" | sudo tee -a /etc/sudoers > /dev/null
|
||||
echo -e "ALL ALL=(ALL) NOPASSWD: /usr/bin/nmcli, /usr/sbin/reboot\nwww-data ALL=(ALL) NOPASSWD: /usr/bin/git pull\nwww-data ALL=(ALL) NOPASSWD: /usr/bin/ssh\nwww-data ALL=(ALL) NOPASSWD: /usr/bin/python3 * www-data ALL=(ALL) NOPASSWD: /bin/systemctl *" | sudo tee -a /etc/sudoers > /dev/null
|
||||
success "Sudo authorization added."
|
||||
else
|
||||
warning "Sudo authorization already set. Skipping."
|
||||
|
||||
Reference in New Issue
Block a user