[ Restart ] restart diet-pi using bash

Hey ! It’s me again :slight_smile:)

– I’m wondering how to restart diet-pi system using Bash script
– how to order a bash script to use a command and read it’s data

and as always thanks for the helpful tips and tricks !

Simple script which just reboots your SBC:

script.sh:

#!/bin/bash
sudo reboot

make it executable with
sudo chmod +x script.sh (or use u+x to just make it executable for the current user)
run it with ./script.sh

I would recommend to use the full path to the executable within a script

/usr/sbin/reboot