Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I've installed CoTURN on Ubuntu 16.04 server. I'm starting the TURN server with the below command:
turnserver -a -o -v -n --cert /etc/letsencrypt/live/mydomain.com/fullchain.pem --pkey /etc/letsencrypt/live/mydomain.com/privkey.pem -u username:password -r "mydomain.com"
I check with Trickle ice and it works fine. But after some random time (typically in days) it stops working/shuts down.
Is there any way to run it forever or at least get an email if the service stops?
Thanks!
I use the NPM tool called PM2 for that. If the service goes down, you can get notifications. Monit can do that - and also restart if necessary.
npm i pm2
pm2 start turnserver
sudo apt install monit
nano /etc/monit/monitrc
Here you can find examples how to enable a specific service. In your case it's the turnserver.
Config
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I connected via ssh to my Ubuntu server.
And I want to create a screen session with a command to run sh script.
I'm trying to do it this way:
screen -dm -S myserver server/start.sh
But nothing happens.
Even screen list is empty.
screen -list
No Sockets found in /run/screen/S-root.
How can I fix it?
Ubuntu 20.04, Screen version 4.08.00 (GNU) 05-Feb-20
Also, I want to put this command on system unit, to make systemd to run the script at system boot. But I can't to make it runs even using a command via ssh.
The problem was that script was failing with an error. I should make cd to run the script.
screen -S myserver -dm bash -c "cd server;sh start.sh"
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I've got a shell script which is supposed to install some packages from the Arch User Repository. The shell script is as follows:
#!/bin/sh
pacaur -S google-chrome --noconfirm # install google-chrome
The problem is, if I run this script using sudo sh script.sh, it'll just return: "you cannot perform this operation as root". If I run it without sudo, it'll ask for sudo later on when installing.
My question is, how can I avoid it asking me. I'd like this script to take care of installing all my packages just as is, without requiring me to actually give access manually. Would there be a way?
If you run sudo -v before calling the pacaur, this will ask you for your credentials and cache them for the next 15 minutes. You don't need to call sudo with pacaur anymore. As long as pacaur finishes running within the next 15 minutes, it will not have to ask for credentials again.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I'm working with a Debian based Linux. Have a script that needs to be executed on boot. Found these instructions describing on how it needs to be one. My only difference is that I need to run a script with a parameter at bootup (myscript.sh --some-option 23). I can't use a wrapper script. I won't explain why, but I will only say that I just can't. Does anyone know how to do it?
The cron daemon has a #reboot command. That runs your script at reboot. So simply edit your crontab and add a line like this:
#reboot /your/script/test.sh
Assuming you are using a system with systemd, this is easy enough. Create a new service file "foo.service":
[Unit]
Description=Powertop autotune
[Service]
ExecStart=/usr/sbin/powertop --auto-tune # XXX replace with your command
[Install]
WantedBy=multi-user.target
and then install it:
ln -s /home/kris/Scripts/systemd/powertop.service /lib/systemd/system
systemctl enable powertop
systemctl start powertop
Obviously your paths and particulars will be different. In particular, the /lib/systemd/system might not be the right place in your distribution.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I am sorry if this is something obvious but I am new to Linux.
I was trying to set a git bare directory and for this I installed ACL on Ubuntu. Then I ran the following commands:
adduser git
mkdir /repositories
chmod 700 /repositories
setfacl -m defaut:user::rwx /repositories
sudo chown git:git /repositories
Everything was fine until I rebooted the machine. Now I am unable to execute sudo anymore. Everytime I do it as myself I get following message:
[[sudo]] password for Andre:
Sorry, try again
The password I enter is the same I always used, and I don't have any problem to SSH with these account credentials.
Does anyone knows what happened and how to fix it?
I think that the issue was with setfacl. I should have used 'repositories' instead of '/repositories'. In that way I set acl across the root. I ended up reinstalling Linux.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
When I attempt to start mysqld, it gives me the following error:
./mysqld: line 3: /etc/default/rcS: No such file or directory
I want to run a mysql server on angstrom linux.
Anyone know how to do this?
I got it to work by commenting out the following line from my /etc/init.d/mysqld file:
. /etc/default/rcS
This is a quick fix I'm guessing, I am not sure what that file does so I don't know the implications of this action, but the mysql server is now working ok!
Your system is missing the file. Apparently it's part of the 'initscripts' package. You can attempt installing it with "sudo apt-get install initscripts". If it's been a while since updates: "sudo apt-get update && sudo apt-get upgrade", but maybe just the update will work. If none of that works, find one online that's suitable for your system and create it manually.