-
-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Disable stop of running script #749
Comments
Hi @xprntb3. Unfortunately there is no supported way to hide the button (or prohibit stop). |
Hey, thanks for the quick reply! Once i got it working, i will write another comment in this issue explaining how, so that others If you guys also take feature requests, maybe the ability to prevent stopping of scripts would be a good idea, |
Or, you could install a custom signal handler in the script, to intercept
the signal from scriptserver.
For example, in Bash you'd use the "trap" command.
https://phoenixnap.com/kb/bash-trap-command
…On Thu, May 23, 2024, 8:54 AM xprntb3 ***@***.***> wrote:
Hi @xprntb3 <https://github.com/xprntb3>. Unfortunately there is no
supported way to hide the button (or prohibit stop). You can hide the
button via custom CSS. But it will be hidden for everyone.
Hey, thanks for the quick reply!
That's no problem, it can be hidden completely and for everyone.
Is there a documentation on editing custom css? I haven't found one yet.
Once i got it working, i will write another comment in this issue
explaining how, so that others
that maybe need it aswell can apply it.
If you guys also take feature requests, maybe the ability to prevent
stopping of scripts would be a good idea,
i can imagine others might find this useful aswell
—
Reply to this email directly, view it on GitHub
<#749 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3HBI3R74QEGW3LNMTDTKWDZDXRHVAVCNFSM6AAAAABIFBJYGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRXGAZTKNZUGI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@MNeill73 this won't work I think. Because STOP button will transform into KILL button after 5 seconds. And you cannot "trap" kill command. |
Eh, this is true...
In this case, then, you probably need to make use of backup copies, exit
functions, and semaphore files to make sure you preserve intact data...
* Backup the data set
* Start the processing loop
** "touch /tmp/myscript.started"
** Process your file
** Remove the touch file
** Remove the backup data set
* End script
* Exit function
** If you're exiting, and the touch file still exists...
*** rm the touch file
*** rm the live data set
*** Move the backup data set back to the live data set
** end exit
…On Thu, May 23, 2024, 10:32 AM Yaroslav Shepilov ***@***.***> wrote:
@MNeill73 <https://github.com/MNeill73> this won't work I think. Because
STOP button will transform into KILL button after 5 seconds. And you cannot
"trap" kill command.
—
Reply to this email directly, view it on GitHub
<#749 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3HBI3T2MIO2UBAJ4OSV6LDZDX4XDAVCNFSM6AAAAABIFBJYGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRXGI3TSOBQGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello guys, found the solution! first, go to your conf/theme/theme.css file (doesn't exist from the getgo, but you can download one of the custom themes for example) Then edit the file and add the above css code to that file above the html:root definition:
This will hide the stop-button. Again, thanks to everyone! |
Cool, yes, this is the right place to define your custom styles |
Hello,
firstly, i deeply want to thank you for this amazing software and the work you guys are putting into it.
This perfectly fits the use case i have and i have been looking for something like this for a long time.
I have a question about script execution, is it possible to prevent the user from doing that?
I looked through the server config and script config documentation, and haven't found anything in this direction.
The only thing i found:
https://github.com/bugy/script-server/wiki/Script-config#--shared_access
But this seems to only control which users/groups can generally run/stop/view this script, but not the actions they
can do inside it. I want some scripts to manipulate data, and if, whyever a user would do that, i dont know, the
user cancels the script, the data would be broken. Is there some way to deny this possibility to users?
If not, is there maybe some workaround, like removing a line of code or removing the stop-button from the Web-UI?
Many thanks in advance.
The text was updated successfully, but these errors were encountered: