5460 530 Posted June 5, 2014 Share Posted June 5, 2014 I'm running Debian Wheezy running a webstream, and installed apache and set up a little web server on my Pi. So, all's good. Although, too good.... Whenever the pi reboots, the apache service restarts automatically! I can manually type in: sudo /etc/init.d/apache2 stop but a reboot restarts. What would the command be to permanently stop this service running? Oh I was suggested another command, but it fails: [email protected] ~ $ update-rc.d apache2 disable update-rc.d: using dependency based boot sequencing update-rc.d: error: Permission denied Link to comment Share on other sites More sharing options...
CL52 + 0 Posted June 5, 2014 Share Posted June 5, 2014 Try adding "sudo " to the second command, that could be why you're getting the "Permission denied" error sudo update-rc.d apache2 disable Link to comment Share on other sites More sharing options...
Guest Posted June 5, 2014 Share Posted June 5, 2014 If you're on the command prompt and you've just typed the update-rc.d command and want to run it with elevated permissions you can just type sudo !! Link to comment Share on other sites More sharing options...
5460 530 Posted June 5, 2014 Author Share Posted June 5, 2014 (edited) sudo sudo sudo....... stupid stupid stupid! :D :D :D Thanks guys :new_doh2: I found another workaround which actually is a cool little tool, just as soon as I read this. "apt-get install rcconf Once installed, run rcconf in SSH and you will receive a dialog box displaying all services set to run on boot. Select the ones by pressing Space to disable/enable the particular and you're done, simpley click on Ok and that service wont bother to start again on next boot. Being using this for years. Very handy tool for Debian/Ubuntu users like me." again needs sudo, but is a great way of looking at what is enabled and disabled on boot!! :D :D This Pi will be the death of me Edited June 5, 2014 by 5460 Link to comment Share on other sites More sharing options...
Guest Posted June 5, 2014 Share Posted June 5, 2014 If you need any help in future, this is a small part of my day job, so I'd hope I can help in most situations. Link to comment Share on other sites More sharing options...
5460 530 Posted June 8, 2014 Author Share Posted June 8, 2014 (edited) That's very kind, and it just so happens I need guiding to my next answer.... So it's a raspberry pi running debian wheezy, and the current build is used purely to run "motion" as a form of CCTV. I've yet to do the mask for the motion detect and the auto-upload to dropbox as I have only just switched to a static IP and want to ensure stability for a few days. Anyway, there's no way I can see using the default motion.conf to set a username and password, so anyone with my IP and port could theroretically view the stream if I have the Pi on. Someone's suggested installing SSL to transfer requests. Also I don't want plaintext in case someone is intercepting traffic if i connect on an unsecure wifi connection. Someone elses conf file if it's easier: http://marc.merlins.org/linux/motion.conf Thoughts or direction? I'm currently using TinyCam on Android which works a treat, any thoughts on an iPhone alternative? The ones I've tried aren't happy if a stream doesn't have a username or password! Finally, I will be building MMAL-motion so I can use the pi camera module, what's the easiest way to get files off the current SD card? I am guessing setting up an ftp server on my laptop and ftping from the pi is a bit overkill! Edited June 8, 2014 by 5460 Link to comment Share on other sites More sharing options...
5460 530 Posted June 8, 2014 Author Share Posted June 8, 2014 Oh and also, the motion service keeps stopping.... boo! Is there any way to automatically re-start maybe once an hour? Link to comment Share on other sites More sharing options...
Guest Posted June 8, 2014 Share Posted June 8, 2014 Oh and also, the motion service keeps stopping.... boo! Is there any way to automatically re-start maybe once an hour? You could set that up in the crontab but I would look through the apache logs to find out why the deamon is stopping. As for your security issue, I take it you view it through a webpage? If so you could set up authentication in apache. Take a look here: http://httpd.apache.org/docs/2.2/howto/auth.html Link to comment Share on other sites More sharing options...
5460 530 Posted June 9, 2014 Author Share Posted June 9, 2014 I am no longer using apache at all. Nope, I am viewing through an android app, although I can view it through firefox also. So, apache wouldn't help with the android app, only the web side, which is a reason why I disabled the apache server! AFAIK that would only secure the page, but not the actual stream. Link to comment Share on other sites More sharing options...
Guest Posted June 9, 2014 Share Posted June 9, 2014 Take a look here, I think the stream still uses apache in which case you can secure it. http://www.lavrsen.dk/foswiki/bin/view/Motion/ConfigOptionWebcamPort Link to comment Share on other sites More sharing options...
5460 530 Posted June 9, 2014 Author Share Posted June 9, 2014 Hmmm that looks like another app to basically copy the frames being captured from the cam, and then re-publishing them but with the ability to put on protection via Apache? So, cam would only allow to transmit to local LAN machines only, but that software will copy and distribute via it's own software? I really should have taken a linux course at uni rather than staying M$ focused.... Link to comment Share on other sites More sharing options...
Guest Posted June 9, 2014 Share Posted June 9, 2014 (edited) Hmmm that looks like another app to basically copy the frames being captured from the cam, and then re-publishing them but with the ability to put on protection via Apache? So, cam would only allow to transmit to local LAN machines only, but that software will copy and distribute via it's own software? I really should have taken a linux course at uni rather than staying M$ focused.... I would expect the stream to use apache anyway. If it doesn't do you know what publishes the stream currently? I am still primarily a Windows admin at heart, but my job now is almost exclusively linux. Edited June 9, 2014 by Burnsy2023 Link to comment Share on other sites More sharing options...
5460 530 Posted June 9, 2014 Author Share Posted June 9, 2014 Nope, the stream doesn't use apache. I am guessing motion has been written to have it's own code to stream. I did see this which is pretty much the same thing as you posted earlier: http://www.lavrsen.dk/foswiki/bin/view/Motion/SecureWebcamFeeds I think I shall take an image of the SD card so if I screw it up when installing and configuring Apache that I can go back to where I am right now. I don't actually want to view the cam via http, I just want to view it via TinyCam on my Android. But, if it will basically password protect then it's not overkill. Windows admin? atta boy..... Link to comment Share on other sites More sharing options...
Recommended Posts