On 28 Sep 2019, Gryvon said the following...
Is there a way to have an Event that shuts down MIS? I need part nightly maintenance to include a reboot, and I don't like the id just task killing it.
I would want that too (actually for restarts) -- I ended up creating cron job for detecting a semaphore and restarting MIS instead...
If you can assign the BBS (Mystic) user rights to stop the service (you're on Windows? Perhaps some NET STOP <service name> command or nowadays probably PowerShell stuff to the same effect), i.e. itself, then that could work.
But it would still require a scheduled job outside of Mystic I think.
Yes, it's Windows. I'm okay if I need to do it through the Task
Scheduler. And it's easy enough to write a batch file with "taskkill /f mis.exe" followed by "shutdown /r". That'd ultimately do the trick, but
A couple of things I'm noting here, first, I said to myself, "Well sure
that's easy! just set up an event in Mystic's Event editor to perform a 'systemctl restart mis.service' (Debian, ewboontew, CentOS, etc).
Slackware would be '/etc/rc.d/rc.mis restart'.Folks using OpenRC would use those facilities instead of SystemD or SysV-ish.This is a perfectly doable thing.
Alternatively, a cronjob or anacron. Both scenarios would work flawlessly I think, and the second scenario would allow one to actually stop mis and then start it a few minutes later. Or, the Event Editor could run the job to stop mis on a pre-determined schedule followed by cron starting it back up later.
And then, I saw the Origin line... Windows. Okay so I didn't comment, but
there are plenty of facilities with scheduling tasks there too.
On the Windows front, I wanted to mention something that I used to use when I set up Windows domains with SAMBA for organizations. Some people have
enntioned problems with roaming profiles and yes, it's always been a biotch
in Windows, but Netlogon is your friend ;)
What I would do is use Kixtart scripts to do everything during a login
process - even the very first time someone logs into a new work station. here's how:
There's a couple of features with Kixtart where you can place part of what Kixtart needs into Netlogon, something anyone logging into the domain has access to during that logon process, A .sys and a .bat IIRC. The .sys enabled Kixtart to function, and the .bat (the only real executable you could put
into Netlogon would grab the Kixtart logon script from a public share, pull
it onto the user's machine, and then it would execute every time the user
logs in.
Then it maps out persistent or non-peristent netork shares P:\ for public and H:\ for home, where each person's roaming profiles are located, fetches their profile, and loads that on the new workstation. All of their files are in
their H:\ drive and a logon server keeps track of which machie that is (You
may be coming to work for a week in Los Angeles from New York or London).
Anyway, there was, and still is, so much that can be done with Kixtart, which is still maintained, although Powershell has supplanted much over the past
few years. The reason for using Kixtart was to work around limitations in NT, and of course, with the proviso that the enterprise has standardized on a particular version of Windows.
Kixtart would draw a really pretty DOS looking style colorized logon screen
and at it's very basic level is identical to DOS batch files, but with conditional branching and the availability of variables like %username%,
etc., at your disposal you can do pretty much anything you can imagine - including a logout script that will copy back anything you need, or
installing software without the aid of something like an SMS server or WinInstall or any other tools that were once prominent for Windows Enterprise environments, but kixtart would scale all the way down to a 4 user company
too in a portable way :)
http://www.kixtart.org/
Obviously, I don't really do Windows stuff much anymore so I'm kinda out of
the loop, but that is still a viable solution, and can run on a Windows machine to be used for things like starting and stopping mis at particular times with sleep functions, whatev. You can get creative, as its utility is more than just using it for logon scripting.
Just thought I'd throw that out there, and anyone who's familiar with DOS
batch programming will excel immediately with Kixtart because on the basic level it is identical :)
Not just for this thread, but I wanted to throw this out there for others who may find such a batch programming language useful. Think Bash functionality
for DOS batch files :)
I hope that helps :)
Kindest regards,
Bradley
.
--- Mystic BBS v1.12 A43 2019/03/02 (Linux/64)
* Origin: Vger.Cloud - NOMAD Internetwork (21:2/104)