Does puppet get the Service from init.d - service

I know that this question was maybe asked by someone else, but I couldn't find it.
I created a custom init script and would like that puppet uses it. So my question now is, does puppet service look into the init.d folder to find a init script?
Thanks for answering in advance!
Regards
Alexander

Sort of dependent on your init system and the provider puppet uses for it, but generally if you create an init script that works puppet will find it based on the name of the script.
Example:
/etc/init.d/mycustomservice
can be puppetized via
service {'mycustomservice':
ensure => running,
}

Related

Hide passwords in Buildbot shell commands from logs

I need to be able to pass password to shell command but don't want it to be available in logs. I tried finding a solution and found something called an Obfuscated class in buildbot, but it seems i'm missing something it's not working and i couldn't find any examples.
Is their some other way or if this is the only way if someone could provide an example.
secrets are supported in Buildbot since 0.9.7. http://docs.buildbot.net/latest/manual/secretsmanagement.html
Using this api to access your secret will automatically make them redacted from the build logs.

Powershell Grant IIS_IUSRS access to SMTP metabase

Ok I am attempting to transfer a manual change to powershell,
Attempting to grant IIS_IUSRS access to /LM/SmtpSvc/ and /LM/SmtpSvc/1/ nodes in the IIS Metabase.
I have googled extensively and can not find an example of what i am looking for.
I have been trying to play with
$smtp = [wmiclass]‘root\MicrosoftIISv2:IIsSmtpServerSetting'
But I am in a little over my head with WMI.
Any help would be appreciated. This setting is required for resolving
This.
Not an exact answer, but the best I have so far. Following the Guide here I chose option 1 and changed the app pool to network service. I will still work on a way to do the permissions settings with powershell.
Update (solution untested)
I found this answer on another post that details how to do it using scripts in the iis6.0 resource toolkit. To get these scripts on server 2012 you have to install the IIS6.0 resource toolkit, the only way i can find to do a silent install of this one was located here from there you can call the scripts using cscript.exe. I stuck with the changing user on the app pool option because it fits in with other things as well.

Why won't my Telescope app start with Upstart?

I've followed instructions online to set up a Telescope instance on my DigitalOcean droplet, but it won't start with Upstart.
I'm able to run the server successfully manually, but the Upstart task doesn't fire when the server boots. I'm sure I should be looking at a log file somewhere to discover the problem, but I'm not sure where.
I've looked for the location of upstart logs, but I'm not having any luck. Either you have to add something to your script to make it log, or it just does it according to accounts online, but neither of those seem to be the case for me.
When I try to search for help on Upstart, I'm also seeing people saying I should be using systemd instead, but I can't figure out how to install it on CentOS 6.5.
Can anyone help me figure a way out of this labyrinth?
I use Ubuntu server 14.04, and my upstart logs are located in /var/log/upstart
The log usually contains stdout from the job, and it should help you understand what's wrong.
My guess is that when the server boots and tries to run your job, MongoDB is not yet ready so it fails silently.
Try installing the specific MongoDB version that Meteor is using at the moment (2.4.9) using these docs :
http://docs.mongodb.org/v2.4/tutorial/install-mongodb-on-ubuntu/
The most important thing is to get upstart support for MongoDB, this will allow us to catch mongod launch as an event.
You can then use this syntax in your upstart script :
start on started mongodb
This will make your node app start when mongo is ready.
I've created a gist with the scripts I wrote to setup a server ready for Meteor app deployment, it's a bit messy and probably specific to Ubuntu but it might help you.
https://gist.github.com/saimeunt/4ace7975b12df06ee0b7
I'm also using demeteorizer and forever which are two great tools you should probably check.

Server configuration error:Fatal error: Cannot redeclare class JDate

everybody,
I have this propblem and I don't know how to solve it. I explain:
I hired a vps and installed a centos6 template with vhm/cpanel.Itried to configure everything and it seems to be working; The only propblem is that the script that I used on a shared host are no more runing and I get this error "Fatal error: Cannot redeclare class + name of class".
This scripts are for example joomla2.5,joomla 3 ,...
I have searched on forums and no body seems to understand this problem. Everybody is thinking it's about using "include" instead of "require_once" but that is not the case because I did not touch anything on this scripts and I simply moved them from the former host to the new environment on the new vps. For me I think something is going wrong on this envirnment not the scripts.
Does anybody have an idea about what's going on on my new vps? Please?
I have solved the problem! The error was due to a wrong php handler "dso".This handler does not allow you to load or redeclare classes inside one script operations.
When I changed to "cgi" everything started running smothly. I think cpanel should not include "dso" php handler as default but set "cgi" or "suPHP" instead.
Here is an article about running PHP as a cgi/apache module.
http://docs.joomla.org/Should_PHP_run_as_a_CGI_script_or_as_an_Apache_module%3F
This other article sugest using cgi on php5 environment and dso on php4.
http://blog.servint.net/2011/10/28/the-tech-bench-all-about-php-handlers/
If you have this problem on shared host I don't know any other work around but calling the hosting campany to adress the issue by changing php handlers on the sever.
Here is another interesting article about php handlers
http://www.webhostingtalk.com/showthread.php?t=679944
Thanks and I hope this will help someone.

OpenLdap redirect on write

I am currently trying to setup a redirect on write for an installation of OpenLdap 2.2.
I have two instances running. One is configured to be read-only (only read access, database specified as read-only) and has redirect configured to point to the second instance. The second instance is configured to allow for the desired write permissions.
When I attempt a modify on the first instance it fails as expected but does not send back the referral. Am I missing a piece of the configuration? Am I even on the right path? Any guidance would be greatly appreciated. Thanks.
In the database section of you slapd.conf do you add the redirection like this ? :
updateref "ldap://master-host:port/"
So, it turns out the best way to do this is to go ahead and set up replication using slurpd and point all requests at the slave instance. Unfortunately you can't set up the master and slave on the same host (for obvious reasons, but still), so I had to spin up a second VM to get this going.
Honestly, if I was not trying to replicate a redirect problem it wouldn't be worth it, but I have to duplicate a production issue.
For more information on slapd and specifically slurpd, the OpenLDAP documentation is actually crazy helpful: slurpd config for OpenLDAP 2.2