Simple supervisor utility to allow you start & stop preconfigured scripts in one click.
Download
See the releases page.
Screenshots
Building
You will need at least Qt 5.8 to build it
To build using an IDE:
Open Qt Creator
Open
scriptvisor.pro
Click Build → Build Project "scriptvisor"
To build using command-line
Install qmake
Type
make
Scripting
On Windows, scripts are executed using PowerShell; on POSIX systems, scripts are executed using Bash.
Startup script
If your startup script returns an exit code of non-zero, and restart delay is set to non-zero, your startup script will be executed again after the delay.
If your startup script returns an exit code of non-zero, but restart delay is set to zero, your script will be shown as "not running" in the menu.
If your startup script does not exit, or returns an exit code of zero, your script will be shown as "running" in the menu.
Shutdown script
When your startup script is shown as "running", you can click on the switch to stop the script.
The shutdown script will be first executed, then processes started by startup script will be killed.
All shutdown scripts need to be executed before Scriptvisor exits. You may choose "Force Quit" in the tray icon menu if it takes too long.
Wait for child processes in PowerShell
If your startup script exits early, child processes created by your startup script will not be terminated when you stop the script. This happens when the child process is not a console application.
To ensure your script waits for child processes, pipe the output to Out-Host
. For example:
& notepad.exe | Out-Host
exit $LASTEXITCODE
PowerShell execution policy problem
By default, PowerShell require scripts to be digitally signed. You have to set execution policy to RemoteSigned
or Unrestricted
to use Scriptvisor.
Open PowerShell as Administrator (Right click and select "Run as Administrator")
Type
Set-ExecutionPolicy RemoteSigned
Auto starting
Windows
Place a shortcut to scriptvisor.exe -autostart
at %AppData%\Microsoft\Windows\Start Menu\Programs\Startup
.
Set the "Start in" property of the shortcut to a folder you want to place the configuration and log files.
Linux
Type sudo make install
to install XDG autostart configuration.
The configuration and log files will be placed at ~/.config/scriptvisor
.
from https://github.com/m13253/scriptvisor
No comments:
Post a Comment