better cron cmd info

This commit is contained in:
Maxi Quoß
2023-01-30 01:21:03 +01:00
parent 1039fc2a46
commit e515ee2fae
3 changed files with 30 additions and 7 deletions

View File

@@ -12,7 +12,7 @@ RUN wget https://github.com/seriousm4x/UpSnap/releases/download/${VERSION}/UpSna
FROM alpine:3 FROM alpine:3
RUN apk update &&\ RUN apk update &&\
apk add --no-cache tzdata ca-certificates nmap samba-common-tools &&\ apk add --no-cache tzdata ca-certificates nmap samba-common-tools sshpass curl &&\
rm -rf /var/cache/apk/* rm -rf /var/cache/apk/*
WORKDIR /app WORKDIR /app
COPY --from=downloader /app/upsnap upsnap COPY --from=downloader /app/upsnap upsnap

View File

@@ -340,16 +340,33 @@
<div class="col-md-6 d-flex align-items-start flex-column"> <div class="col-md-6 d-flex align-items-start flex-column">
<div class="callout callout-info mb-auto"> <div class="callout callout-info mb-auto">
<h5>Optional:</h5> <h5>Optional:</h5>
<p class="m-0">(1) Same cron syntax as for ping interval.</p>
<p class="m-0"> <p class="m-0">
(2) Shell command to be executed. "net rpc", "sshpass" and "nmap" are available. (1) Read more about valid cron syntax on <a
href="https://en.wikipedia.org/wiki/Cron"
target="_blank"
rel="noreferrer">wikipedia</a
>
or the package documentation
<a
target="_blank"
rel="noreferrer"
href="https://pkg.go.dev/github.com/robfig/cron"
>pkg.go.dev/github.com/robfig/cron</a
>
</p>
<p class="m-0">
(2) Shell command to be executed. "net rpc", "sshpass" and "curl" are available.
e.g.: e.g.:
</p> </p>
<ul> <ul>
<li>Windows: "net rpc shutdown -I 192.168.1.13 -U test%test"</li>
<li> <li>
Linux: "sshpass -p your_password ssh -o 'StrictHostKeyChecking=no' Windows: <code>net rpc shutdown -I 192.168.1.13 -U "user%password"</code>
user@hostname 'sudo poweroff'" </li>
<li>
Linux: <code
>sshpass -p your_password ssh -o "StrictHostKeyChecking=no"
user@hostname "sudo poweroff"</code
>
</li> </li>
</ul> </ul>
<p class="m-0"> <p class="m-0">

View File

@@ -226,7 +226,13 @@
>. >.
</p> </p>
<p class="m-0"> <p class="m-0">
Read more about valid cron syntax at <a Read more about valid cron syntax on <a
href="https://en.wikipedia.org/wiki/Cron"
target="_blank"
rel="noreferrer">wikipedia</a
>
or the package documentation
<a
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
href="https://pkg.go.dev/github.com/robfig/cron" href="https://pkg.go.dev/github.com/robfig/cron"