Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • Please provide further information. What is the .ps1 supposed to do? What is your OS and version? I am also confused about that whole line sudo chmod systemctl enable rc-local ... What do you think that command is supposed to do? Commented Apr 26, 2021 at 14:19
  • @C.M. .ps1 is supposed to copy new files from an asterisk directory and transfer them to an Azure storage container. I'm using Sangoma Linux (CentOS 3.10.0). That command is supposed to look if there’re is any problem with root, so the command on /etc/rc.local can be executed on the root as default; and to not be executed on the default user. Commented Apr 27, 2021 at 7:01
  • I will need to use more then one comment for all this.. So read them all first. First, Edit your question to reflect any changes needed. (Usually, when a comment asks you for more information, you should edit the question to include the information, such as copy/pasting he relevant parts of the .ps1 file.) But that may not be needed after all.. read the next comments(s).. Commented Apr 27, 2021 at 8:54
  • Regarding that last command, the first part, sudo basically means "run as root" (I.E., the System account, if you're used to Windows accounts, which is even more powerful than the Administrator account). the second part is the command to run, chmod, which changes file level permissions of the filenames listed. So the final parts, systemctl enable and rc-local are not being treated as commands--they're being treated as three filenames for chmod to operate on. Which does not match what you say you think it does. Commented Apr 27, 2021 at 8:55
  • So back to your original problem... As you describe what the .ps1 file does, you need to keep one (or more) directories/files synchronized between Asterisk and your Azure storage, correct? Have you looked in to the command rsync for this? It has many options to do exactly that in many different ways. And the las part, you wan to make sure i is run continuously. How do you define continuously? Each microsecond? Each millisecond? Each second? Or is once a minute good enough? Commented Apr 27, 2021 at 8:59