logrotate[9251]: error: asterisk:36 lines must begin with a keyword or a filename (possibly in double quotes)
logrotate[9251]: error: found error in file asterisk, skipping
Be careful @penguinpbx , although # is almost universally recognized as the bwginning of a comment, Asterisk is an exception where it confusingly should be interpretted as an ‘inclusion path’ and the less obvious semicolon used for comments, of course this does not apply to logrotate configurations as can be confirmed with man logrotate
I believe that the original artifact of the
-e #This comment is to fix rpm file replacing
is a leftover bit of an badly formed install script for FreePBX 17 from when when Sangoma only swung RedHat , it is apparently not there anymore
Agreed, yes, thanks @dicko, when it comes to Asterisk configuration files, be wary of # – see for example the #include in FreePBX’s extensions.conf file:
Again, please don’t conflate FreePBX with Asterisk, all parts of Asterisk including Comedian Mail follow the comment comments rubric. You merely post a snippet of how FreePBX is compliant.
There should be no trace of the word “rpm” anywhere in Debian based FreePBX 17 apart from a README or such. That it existed for the OP is a clue ( to me at least) that someone blotted their copy-book a while ago in either the install script or the deeper module code it installs.
# as a directive marker comes from the C programming language and earlier. I know it is used a comment marker in shell scripts, but I’d have to check the convention for other languages. I don’t think ; is very common, as anything other than a statement delimiter, outside the Asterisk world.
Check PHP which with shell scripts is 99%+ of FreePBX.
As to # in c. well I have occasionally seen it used but most of us prefer // as it is much easier to change to /*and back for blocks, mysql inherits that behavior
# in C is used for pre-processor directives: conditional compilation and file inclusion, etc., not for comments. // to newline and /* … */ are used for comments.