<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.geekworm.com/index.php?action=history&amp;feed=atom&amp;title=CommentStreams%3AF49f1f7f3dd261f981feebe135656a2c</id>
	<title>CommentStreams:F49f1f7f3dd261f981feebe135656a2c - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.geekworm.com/index.php?action=history&amp;feed=atom&amp;title=CommentStreams%3AF49f1f7f3dd261f981feebe135656a2c"/>
	<link rel="alternate" type="text/html" href="https://wiki.geekworm.com/index.php?title=CommentStreams:F49f1f7f3dd261f981feebe135656a2c&amp;action=history"/>
	<updated>2026-07-28T00:09:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.geekworm.com/index.php?title=CommentStreams:F49f1f7f3dd261f981feebe135656a2c&amp;diff=32469&amp;oldid=prev</id>
		<title>23.127.128.93: Migrated comment #2362</title>
		<link rel="alternate" type="text/html" href="https://wiki.geekworm.com/index.php?title=CommentStreams:F49f1f7f3dd261f981feebe135656a2c&amp;diff=32469&amp;oldid=prev"/>
		<updated>2022-02-25T07:37:20Z</updated>

		<summary type="html">&lt;p&gt;Migrated comment #2362&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;- The installation process should create a systemctl service to start/stop the process instead of using crontab.&lt;br /&gt;
&lt;br /&gt;
I did the following:&lt;br /&gt;
&lt;br /&gt;
Copied /home/pi/x728/x728v2-asd.py to /usr/local/bin:&lt;br /&gt;
sudo cp /home/pi/x728/x728v2-asd.py /usr/local/bin&lt;br /&gt;
&lt;br /&gt;
Then created a systemctl service file to start the script:&lt;br /&gt;
&lt;br /&gt;
sudo vi /lib/systemd/system/x728-shutdown.service&lt;br /&gt;
&lt;br /&gt;
Contents of the file:&lt;br /&gt;
&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Geekworm x728 Shutdown Service&lt;br /&gt;
After=network.target&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=simple&lt;br /&gt;
StandardOutput=null&lt;br /&gt;
WorkingDirectory=/usr/local/bin&lt;br /&gt;
User=root&lt;br /&gt;
Restart=always&lt;br /&gt;
RestartSec=3&lt;br /&gt;
ExecStart=/usr/bin/python3 /usr/local/bin/x728v2-asd.py&lt;br /&gt;
ExecReload=/bin/kill -2 $MAINPID&lt;br /&gt;
KillMode=process&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
Then I reloaded systemctl to read the new service file:&lt;br /&gt;
&lt;br /&gt;
sudo systemctl daemon-reload&lt;br /&gt;
&lt;br /&gt;
Enable the service:&lt;br /&gt;
&lt;br /&gt;
sudo systemctl enable x728-shutdown.service&lt;br /&gt;
&lt;br /&gt;
Started the service:&lt;br /&gt;
&lt;br /&gt;
sudo systemctl start x728-shutdown.service&lt;br /&gt;
&lt;br /&gt;
Display the status:&lt;br /&gt;
&lt;br /&gt;
sudo systemctl status x728-shutdown.service&lt;br /&gt;
&lt;br /&gt;
● x728-shutdown.service - Geekworm x728 Shutdown Service&lt;br /&gt;
     Loaded: loaded (/lib/systemd/system/x728-shutdown.service; enabled; vendor preset: enabled)&lt;br /&gt;
     Active: active (running) since Thu 2022-02-24 18:30:59 EST; 3min 55s ago&lt;br /&gt;
   Main PID: 1632 (python3)&lt;br /&gt;
      Tasks: 1 (limit: 1597)&lt;br /&gt;
        CPU: 113ms&lt;br /&gt;
     CGroup: /system.slice/x728-shutdown.service&lt;br /&gt;
             └─1632 /usr/bin/python3 /usr/local/bin/x728v2-asd.py&lt;br /&gt;
&lt;br /&gt;
Feb 24 18:30:59 raspberrypi systemd[1]: Started Geekworm x728 Shutdown Service.&lt;br /&gt;
&lt;br /&gt;
MUCH better than adding to crontab!&amp;lt;!-- migrated from Comments; original IP: 23.127.128.93 --&amp;gt;&lt;/div&gt;</summary>
		<author><name>23.127.128.93</name></author>
	</entry>
</feed>