2018-10-22         Boyd

What am I doing wrong in monit syntax with regex?

In my monitrc i wrote next:check file mysite.com-access.log with path /var/log/apache2/mysite.com-access.log if content = "\/1.[01]\" 4(\d){2}" then alertBut the systemctl status monit.service says I have an error in syntax:extsites monit[19043]: * Starting daemon monitor monitextsites monit[19043]: /etc/monit/monitrc:305: syntax error '\d'extsites monit[19043]: ...fail!Earlier I put "\/1.[01]\" [45](\d){2}", but error in syntax was in '[45]'.What am I doing wrong? All my regex was right in https://regex101.com/.Update:I corrected my string as if content = "^\/1...

 linux                     2 answers                     39 view
 2018-10-22         Ken

Crontab every 3 days not working

The last week I created a new crontab to do backups each three days and it didn't work.This is the cron:0 12 */3 * * /home/importante.shIt's supposed to execute every three days at 12:00, but it didn't work for me.Tried the script and is working fine, just the cron not executing it, any idea? Your cron entry looks fine. You are just missing the bash command.0 12 */3 * * /bin/bash /home/importante.shI am assuming you are using bash. Just replace if it's different for you. [XXX]

 linux                     1 answers                     40 view
 2018-10-22         Curitis

How can I feed input within bash [Executed through the Network]

As the title says, within linux how can I feed input to the bash when I do sudo bashLets say I have a bash script that reads the name.The way I execute the script is through sudo using: cat read-my-name-script.sh | sudo bash Lets just say this is how I execute the script throught the network.Now I want to fill the name automatically, is there a way to feed the input. I tried doing this: cat read-my-name-script.sh < name-input-file | sudo bash where the name-input-file is a file for the input that the user will be using to feed the script.I am new to linux and learning to...

 linux                     2 answers                     44 view
 2018-10-22         Adair

Ensuring the existence of a user on a Debian GNU/Linux system

I'm currently working on a Debian package for an in-house program. As part of this package, I need to create the user which most of the functionality of the program runs as. I am doing this in the postinst script. The postinst script can be run several times (on upgrade, for example), so it's important to ensure that I'm not going to attempt to create the user every time.So, how can I ensure that the user is created only the first time that the script is run, without affecting it on later runs of the script? Try:[aiden@dev ~]$ id aidenuid=500(aiden) gid=500(aiden) gro...

 linux                     3 answers                     48 view
 2018-10-22         Cora

Azure Linux VM is not starting/stopping

I'm trying to start/stop my Linux VM on Azure but I can neither start nor stop my VM. It stucks at "Starting virtual machine..." when starting and "Stopping virtual machine..." when stopping then throws an error and says "Failed". In my overview screen of my VM, IP address of the VM won't go away so it looks like VM is not stopping at all. How can I fix this? We are currently experiencing an outage in South Central UShttps://azure.microsoft.com/en-us/status/You will want to monitor the Azure Status Page for further updates. Unfortunately we cannot do anything until the p...

 linux                     1 answers                     14 view
 2018-10-22         Lindsay

My crontab run sequently less than 1 minute

I use crontab to run Laravel schedule, this is my cron entry:* * * * * php /var/www/mailserver/artisan schedule:run >> /dev/null 2>&1In App/Console/Kernel.php I just write log file:Log::info('Schedule excuted');But in my log file, it seems run sequently in 3 seconds instead of 1 minutePlease help me, how to run cronjob slow down? The cron statement you provide is telling it to run constantly. Chances are there is just a delay of 3 seconds between the log being called. If you read the scheduling docs you would see that to run every minute you need to do the f...

 linux                     1 answers                     84 view
 2018-10-22         Lionel

DNSSEC Key Roll Over regarding DS record updation

Please help me to clarify my doubts,I have a doubt regarding DNSSEC Key Roll Over.If any specific reason to resign every domain within a time period?If it gets resigned and regenerated KSK and ZSK did I need to update new DS record at registrar end?What are the things need to be done after a DNSSEC resigning process?Thanks. Your question is too vague/unclear/off topic.But in broad terms: only if you change the KSK you need to change the DS at the parent.If you change the ZSK it just needs to be resigned by the current KSKs. You can also uploads new DS records in advance ...

 linux                     1 answers                     63 view
 2018-10-22         Len

Docker daemon socket configuration

i couldn't find an answer online, hence my question: why is the Docker daemon opening an IPv6 socket only? how to force it to use either a dual-stacked or IPv4-only socket?# docker version:Client: Version: 17.06.2-ol API version: 1.30 Go version: go1.8.3 Git commit: d02b7ab Built: Fri Oct 6 00:02:23 2017 OS/Arch: linux/amd64Server: Version: 17.06.2-ol API version: 1.30 (minimum version 1.12) Go version: go1.8.3 Git commit: d02b7ab Built: Fri Oct 6 00:03:48 2017 OS/Arch: linux/amd64 Experimental: falsethe /etc/sysconfig/docker-ne...

 linux                     1 answers                     74 view
 2018-10-22         Lou

maven not downloading dependencies because the trustAnchors parameter must be non-empty

Before anybody closes the question or flags it as repeated, I must say I've been researching all the internet and could not find any similar problem.The thing is I installed a fresh Linux Mint 19 in a Virtual Box image. So after installing Java 8 I downloaded Eclipse Scala and any dependency I try to add to my new project won't be downloaded and an error is marked in its pom.xml .After checking the urls and doing exactly the same on my Eclipse Scala for Windows (in the host machine) it works, but not for the Linux one.I think it should be an eclipse bug as it has to do with...

 linux                     1 answers                     18 view
 2018-10-22         Rose

git push --mirror - internal server error

I have created a git repo using (GIT API) and initiated it with git init. (but no git add or git commit command) . when i try to use the git push --mirror , it gives internal server error. I saw the following bug (100+ ref will give internal server error)https://github.com/isaacs/github/issues/1253even my repo got 500+ refs. Do i need to use git add and git commit to push the repository to github with mirror command ? when i do the git add and git commit on local repo, i can push the content.I'm doing all those using the API, and is it possible to use git push --mirror wit...

 linux                     1 answers                     36 view
 2018-10-22         Giles

SED Command Replacement

Suppose I have a file with warnings. Each warning in a new line with an id that has 3 capital letters followed by 3 digits only, should be replaced by its id.Example:SIM_WARNING[ANA397]: Node q<159> for vector output signal does not existThe output should be ANA397 and the rest of line is deleted.How to do so using sed? I don't think you need sed for that. A simple grep with --only-matching could do, as in:grep -E 'SIM_WARNING\[(.)\]' --only-matching should work for you.Where: -E does "enhanced regular expressions. I think we need those for capturing with ( )then f...

 linux                     3 answers                     44 view
 2018-10-22         Hilda

Windows 10 Bash and Google Chrome with filepath parameter

I am attempting to use Windows 10 Bash as an alternative to PowerShell, as my requirements towards neither of them are high. As of now I am satisfied with quickly navigating the system and using tools such as grep.To my question:At this moment I attempt to open PDF files (or any files for that matter) using the Kali Linux Client of Windows 10. This means I run a Kali Linux Bash in Windows 10 and try opening a .pdf file located at C:\Folder\Subfolder\MyFile.pdf, similar to the way I am used to on my Ubuntu machine. The command does not appear to be working however. The comma...

 linux                     1 answers                     51 view
 2018-10-22         Afra

How can i escape arguments pass in bash script command line

I have one variable , which is coming from some where likeVAR1='hhgfhfghhgf"";2Ddgfsaj!!!$#^$\'&%*%~*)_)(_{}||\\/'Now i have command like this./myscript.sh '$VAR1'I am getting that $VAR1 from some diff process and when i display it look excatly as its aboveNow that command is failing as there is already single quote inside variable. in the process wehre i use its expaned at that point , which causes that error I have control over myscript.sh but not above command.Is there any way i can get variable inside my script? What you are saying is not possible to failing when...

 linux                     1 answers                     53 view
 2018-10-22         Darren

ripMIME not working when using variable as file name

I need to extract an attachment that I receive every day via email, on a linux server.I'm using ripMIME for this task and have a script like this:theFile=$(ls -t * | head -n 1)ripmime -i $theFile -d /home/myDirectory/First line assigns the name of the newest file (email) to the variable "theFile"Second line should extract it's attachments to the /home/myDirectory/ path, however it doesn't extracts anything.However, if I execute this line: (including the file name instead of the variable)ripmime -i 1536138112.M623890P26484.myDomain.com,S\=1345977,W\=1363482:2,S -d /home/myDi...

 linux                     1 answers                     61 view
 2018-10-22         Chloe

I want the command prompt in the linux terminal to appear on a new line after printing to the terminal

After executing the command in the bash terminal :printf 'A%.0s' {1..20}A string consisting of twenty "A" characters will print to the terminal string. What is annoying is that the command prompt will follow directly behind the printed string, which clutters the terminal and looks unsightly, looks like this :AAAAAAAAAAAAAAAAAAAAubuntu@ubuntu-VirtualBox:~/Desktop$That looks terrible. Is it possible to get the command prompt :"ubuntu@ubuntu-VirtualBox:~/Desktop$"To appear below the printed sequence of characters?Thank You. Try bellow command and visit ( http://tpcg.io/5IFL...

 linux                     1 answers                     64 view
 2018-10-22         Larry

Understanding target_link_libraries

I am new to Linux. I see in my CMakeLists.txt the following; target_link_libraries(app wiringPi serializer iothub_client iothub_client_mqtt_transport umqtt aziotsharedutil ssl crypto curl pthread m ssl crypto)My question/understanding is; by doing this Are we telling CMake tool ...

 linux                     2 answers                     57 view

Page 1 of 1008  |  Show More Pages:  Top Prev Next Last