PartsPC: Difference between revisions

From NURDspace
No edit summary
No edit summary
Line 3: Line 3:
|Owner=Space
|Owner=Space
|Status=Working
|Status=Working
|Hostname=parts.dhcp.nurd.space
|Hostname=partspc.dhcp.nurd.space
|Location=Zaal 2
|Location=Zaal 2
|Picture=IMG 20190105 215626.jpg
|Picture=IMG 20190105 215626.jpg

Revision as of 00:16, 24 February 2019

HarkTV
IMG 20190105 215626.jpg
Owner Space
Status Working
Hostname partspc.dhcp.nurd.space
Location Zaal 2
Tool No
Tool category

HarkTV

IMG 20190105 215626.jpg {{{InventoryOwner}}}Property "Tool Owner" (as page type) with input value "{{{InventoryOwner}}}" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process. Zaal 2

What

Workstation in Zaal 2. It has a barcode scanner which can be used for Partkeepr.

Auto shutdown

We want this machine to shutdown when space is closed. We check MQTT for this in a simple python script. We use paho, so let's install that:

apt-get install python-paho-mqtt

Normally the script would ask for a password to execute the shutdown command. We can avoid this with following line in /etc/sudoers (use visudo for this):

hark harktv =NOPASSWD: /bin/systemctl poweroff

Now we just run a cronjob every 5 minutes:

*/5 * * * * ~/space_status_shutdown.py