How to run a startup script using systemd
Today's tip is how to run a startup script using systemd. If everything you need is to run a simple startup script when you boot into Linux, there's no need to become an expert in systemd. Below are the files I used on this video.
/usr/local/sbin/my-startup.sh:
#!/bin/sh
hdparm -Y /dev/sdb
/etc/systemd/system/my-startup.service:
[Unit]
Description=Startup
[Service]
ExecStart=/usr/local/sbin/my-startup.sh
[Install]
WantedBy=multi-user.target
Видео How to run a startup script using systemd канала Linux Spot
/usr/local/sbin/my-startup.sh:
#!/bin/sh
hdparm -Y /dev/sdb
/etc/systemd/system/my-startup.service:
[Unit]
Description=Startup
[Service]
ExecStart=/usr/local/sbin/my-startup.sh
[Install]
WantedBy=multi-user.target
Видео How to run a startup script using systemd канала Linux Spot
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
Write Your Own Bash Scripts for Automation [Tutorial]Creating systemd Service FilesRun any Program in Raspberry Pi at Startup Automatically : The Easiest WayLinux - Start, Stop, Restart Services (Systemd, systemctl, service, init.d )How To Autostart Programs On LinuxSystemd TimersHow to create a systemd service.A Comprehensive Guide To Tiling Window ManagersRun Python script on clicking HTML button | Script Output on Html Page Part1How to Make a Raspberry Pi Program Start on Boot (systemd)Shell Scripting Crash Course - Beginner LevelSetting up a Simple Linux SystemD StartupFACE RECOGNITION + ATTENDANCE PROJECT | OpenCV Python | Computer VisionAuto Run Script as Root at StartupDebConf 14: QA with Linus TorvaldsHow To Run A Command On StartUp in Linux (works on Centos & Ubuntu)Linux Crash Course - systemd: Using the systemctl commandHow to Autorun/Autostart Your Python Script in the Raspberry Pi OSsystemd - The Good PartsHow to use systemd to keep programs running