HDPARM persistant setting after reboot

I have a new SAMBA server up and running on my home network.

Playing my silly question card here : How do I make my hdparm settings persistant so they don’t default after a reboot?

Thanks in advance for the assistance.

What is an “hdparm” setting and what does it do?

hdparm is a command line utility that allows one to test and tweak dard drive parameters:
https://www.geeksforgeeks.org/hdparm-command-in-linux-with-examples/

The drawback is that any optimized settings are defaulted after a reboot.

After some ‘Googling around’, I created a systemd service file - /usr/lib/systemd/system - to sustain my custom HD parameters after a reboot :

[Unit]
Description=hdparm sleep
After=suspend.target

[Service]
Type=oneshot
ExecStart=/usr/sbin/hdparm -S 242 -B 127 /dev/sda1

[Install]
WantedBy=multi-user.target suspend.target

Then:

# systemctl enable hdparm.service
# systemctl start hdparm.service
# systemctl status hdparm.service

● hdparm.service - hdparm sleep
   Loaded: loaded (/usr/lib/systemd/system/hdparm.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Fri 2018-06-22 04:12:05 PDT; 4 years 6 months ago
  Process: 289 ExecStart=/usr/sbin/hdparm -S 242 -B 127 /dev/sda1 (code=exited, status=0/SUCCESS)
 Main PID: 289 (code=exited, status=0/SUCCESS)

Jun 22 04:12:05 frankie.litterboxlive.net systemd[1]: Starting hdparm sleep...
Jun 22 04:12:05 frankie.litterboxlive.net hdparm[289]: SG_IO: bad/missing sense data, sb[]:  f0 00 01 00 50 00 00 0a 80 00 00 00 00 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0>
Jun 22 04:12:05 frankie.litterboxlive.net hdparm[289]: SG_IO: bad/missing sense data, sb[]:  f0 00 01 00 50 00 00 0a 80 00 00 00 00 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0>
Jun 22 04:12:05 frankie.litterboxlive.net hdparm[289]: /dev/sda1:
Jun 22 04:12:05 frankie.litterboxlive.net hdparm[289]:  setting Advanced Power Management level to 0x7f (127)
Jun 22 04:12:05 frankie.litterboxlive.net hdparm[289]:  setting standby to 242 (1 hours)
Jun 22 04:12:05 frankie.litterboxlive.net hdparm[289]:  APM_level        = 127
Jun 22 04:12:05 frankie.litterboxlive.net systemd[1]: hdparm.service: Succeeded.
Jun 22 04:12:05 frankie.litterboxlive.net systemd[1]: Started hdparm sleep.

Wishing you all a Merry Christmas