OctoPrint doesn't run as root, so the permissions could be related (sorry haven't spoken French in ages). If anything I suspect this is related to a permissions issue, the bash script isn't made executable (I think one screenshot shows this is set correctly), or you need to use full paths for the gpio commands inside the script. If you run the script manually in SSH session logged in as the same user the OctoPrint service runs under does it work as expected? What is your octoprint running under, the path shows in one of the screenshots was strange /media/phillipe....etc. Personally I would put the script file in OctoPrint's base folder under the Scripts folder and that would allow for it to be backed up with OctoPrint's backup system.