Code Monkey home page Code Monkey logo

Comments (7)

LukeHandle avatar LukeHandle commented on July 19, 2024 1

This seems to be a fairly aceptable init.d template: https://github.com/fhd/init-script-template

Basically, they start it then redirect the outputs to 2 log files, before grabbing the PID and putting it in a file.
/path/to/service >> /path/to/log/stdout.log 2>> /path/to/log/stderr.log &

Personally, I am using systemd:

[Unit]
Description=Google OAuth Proxy

[Service]
User=google_auth_proxy
Group=google_auth_proxy
EnvironmentFile=/etc/sysconfig/google_auth_proxy
ExecStart=/usr/lib/google_auth_proxy/google_auth_proxy --redirect-url=https://example.com/oauth2/callback --authenticated-emails-file=/usr/lib/google_auth_proxy/authenticated-emails  --upstream=http://localhost:4140/

[Install]
WantedBy=multi-user.target

Hope this helps.

from oauth2_proxy.

vjanelle avatar vjanelle commented on July 19, 2024

There's also the pleaserun gem which can generate this for you.

from oauth2_proxy.

gbagnoli avatar gbagnoli commented on July 19, 2024

here is one for upstart in case it's needed

description "Google auth proxy"
start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [016]
setuid <user>
setgid <group>
respawn
respawn limit 10 5
exec /usr/local/bin/google_auth_proxy --redirect-url=https://example.com/oauth2/callback --authenticated-emails-file=/usr/lib/google_auth_proxy/authenticated-emails  --upstream=http://localhost:4140/ <other_options>

from oauth2_proxy.

lorello avatar lorello commented on July 19, 2024

Thanks Giacomo! :-)

from oauth2_proxy.

artooro avatar artooro commented on July 19, 2024

The template @LukeHandle linked to is working great for me!

from oauth2_proxy.

bangert avatar bangert commented on July 19, 2024

a systemd service file has been added to the contrib directory
https://github.com/bitly/oauth2_proxy/blob/master/contrib/oauth2_proxy.service.example

from oauth2_proxy.

ajsharp avatar ajsharp commented on July 19, 2024

It would be great to add upstart and system V examples for the time being (those aren't going anywhere anytime soon).

from oauth2_proxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.