The script is expecting a third string passed to it. The first two strings aren't referred to. Regardless of the setting of the passed string, the script will always exit.
Unless path_root is "/" then exit. However the first if statement sets path_root to "" if path_root is "/", so the script will never run it's intended job.
As pmset will only set the value to the current running OS you may wish to just remove these if statements. Also you set formatted_date, but never use it, so you might want to remove this too.
The script is expecting a third string passed to it. The first two strings aren't referred to. Regardless of the setting of the passed string, the script will always exit.
Unless path_root is "/" then exit. However the first if statement sets path_root to "" if path_root is "/", so the script will never run it's intended job.
As pmset will only set the value to the current running OS you may wish to just remove these if statements. Also you set formatted_date, but never use it, so you might want to remove this too.