If you have a Python script that you need to run automatically, one great solution is to create a systemd service. This way lets you manage your script using the
service command just like any other daemon. Creating your own service on Debian 9 only requires creating one
.service file and registering it with systemd. Easy!
System service files are located in
/lib/systemd/system/. You can also create user services and those are stored in
/usr/lib/systemd/system/. These files specify all the details that systemd needs to start and control the services. There are a lot of options that can be included, however, in its most basic form we only need a few basic things. The example below shows the minimum requirements. Let’s say we put this in a new file at
Description=My Python Example Service
To enable the service with systemd, simply tell systemd to enable it as shown below.
# Enable the new service we just created
systemctl enable python-example.service
# Manually start and check its status
service python-example start
service python-example status
That’s all you need to run a Python script as a service! At some point I may throw together an example script and add it to this article, but for now this should get you going.
Last Thursday, January 4th, 2018, was bad day for Windows 7 users with older AMD processors. Anyone who installs updates automatically most likely woke up on Friday to a BSOD (Blue Screen Of Death) with the words “stop: 0x000000c4 …”
We had a handful of computers at the office that wouldn’t boot no matter which way we tried. Not Start Windows Normally, Last Known Good Configuration, Safe Mode, or Startup Repair would work. I spent the entire day on Friday just trying to get those computers back up and running. By the end of it all, I figured out the problem, the cause, and a solution. I also posted my first ever Reddit post about the whole ordeal on /r/sysadmin.
As we know now, the culprit was the Quality Update for Windows 7 (KB4056897). It also looks like a few other updates may cause some issues with AMD devices, but big problem is with KB4056897. We have not witnessed any problems from the other updates.
Taken from my Reddit post:
“Finally found a solution to remove the update package using DISM. On startup, press F8 and select Repair Your Computer. From there, open a command prompt window. Check that the Windows drive is mapped by running
Run the command
dism /image:d:\ /remove-package /packagename:Package_for_RollupFix~31bf3856ad364e35~amd64~~7601.24002.1.4 /norestart
It should say processing 1 of 1 and show a progress bar. If all goes well, it will say completed successfully and you can restart into Windows. We’re going through checking for updates and hiding that patch so it won’t reinstall…”
Microsoft knows of the problems AMD users are having. This morning Microsoft blocked the update for devices with the affected AMD hardware. There is a thread on the Microsoft forum that includes a list of the affected processors. Hopefully, this update recall will prevent more computers from getting the BSOD, but anyone who already installed the update will need to manually remove it from the startup repair command prompt.
For the past few years my Soundcloud account has been, well, dead. I finally broke the silence today and uploaded a few of the tracks that I have almost ready for my album. Those tracks are New Beginnings, Horizon, Daybreak, and The Quest. Most of those are solo works, but New Beginnings (and a couple others that haven’t been uploaded yet) were a collaboration with k0rrupt3d (although his Soundcloud is under his alter-ego Slaughter the Sic). He’s far more accomplished in music than I and it would take an entire article, maybe more, to really cover all of that, so I’ll save that for another time.
Of the tracks I uploaded today, I still have a few more little changes to make before they’re final. I really just wanted to get something new out there to show that, “I’m not dead yet!” Hopefully I can bring a little bit of attention back to my account before I make the big release. Also, I have a few other projects in the works and I’ll get them uploaded as they get cleaned up.
P.S. I think I should figure out how to use Soundcloud’s embedded player so I can have my tracks playable on here.
Music is life, or so they say. Over the past few years, I’ve been slowly producing tracks as the creative flow comes and goes. I released one album (albeit short – only two tracks) a few years ago under the name Delta Wave. Fast forward four years and now I have a few more tracks almost ready to release my first real album under a new name, Zero Theory!
All of my older tracks will still be available under my Zero Theory Soundcloud account (formerly Delta Wave). New ones will be posted both here on ZeroTheory.net as well as on Soundcloud.
Computers… ah, yes! They’re such a revolutionary invention. One of the greatest things about them is that they can be programmed to do almost anything. My wide array of experience spans from low-level circuitry and basic microprocessor programming through high-level software development and network management. Here you’ll find many of the problems that I have run into as well as any tips or tricks I come across.
After long time waiting and much work to get a working server, I finally did it. I got my own website! I say that like it’s all done, but the real work will be running it and keeping it updated. We’ll see how well I do!