Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sso
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ai
sso
Commits
ed0ae76a
Commit
ed0ae76a
authored
11 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
use gunicorn for the login service
parent
d4f71167
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
debian/ai-sso-server.init
+42
-16
42 additions, 16 deletions
debian/ai-sso-server.init
debian/changelog
+7
-0
7 additions, 0 deletions
debian/changelog
debian/control
+2
-1
2 additions, 1 deletion
debian/control
with
51 additions
and
17 deletions
debian/ai-sso-server.init
+
42
−
16
View file @
ed0ae76a
...
@@ -6,14 +6,18 @@
...
@@ -6,14 +6,18 @@
# Required-Stop: $local_fs $remote_fs $syslog $network
# Required-Stop: $local_fs $remote_fs $syslog $network
# Default-Start: 2 3 4 5
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Default-Stop: 0 1 6
# Short-Description: start and stop the A/I Single-Sign-On server
# Short-Description: A/I Single-Sign-On Server
# Description: Starts and stops the A/I Single-Sign-On server.
### END INIT INFO
### END INIT INFO
DAEMON
=
/usr/sbin/sso_server
NAME
=
sso_server
GUNICORN
=
/usr/bin/gunicorn
GUNICORN_APP
=
"sso_server.wsgi:app"
GUNICORN_OPTS
=
RUNDIR
=
/var/run/sso
RUNDIR
=
/var/run/sso
LOGDIR
=
/var/log/sso
LOGDIR
=
/var/log/sso
PIDFILE
=
${
RUNDIR
}
/
sso_server
.pid
PIDFILE
=
${
RUNDIR
}
/
${
NAME
}
.pid
SSO_PORT
=
5002
SSO_PORT
=
5002
USER
=
ai-sso
USER
=
ai-sso
NO_START
=
1
NO_START
=
1
...
@@ -25,29 +29,50 @@ check_dirs() {
...
@@ -25,29 +29,50 @@ check_dirs() {
chown
-R
${
USER
}
${
LOGDIR
}
chown
-R
${
USER
}
${
LOGDIR
}
}
}
test
-x
${
GUNICORN
}
||
exit
0
test
${
NO_START
}
-eq
1
&&
exit
0
test
-e
/etc/default/ai-sso-server
&&
.
/etc/default/ai-sso-server
test
-e
/etc/default/ai-sso-server
&&
.
/etc/default/ai-sso-server
test
-x
${
DAEMON
}
||
exit
0
.
/lib/lsb/init-functions
test
${
NO_START
}
-eq
1
&&
exit
0
GUNICORN_OPTS
=
"
--bind 127.0.0.1:
${
SSO_PORT
}
--worker-class gevent
--daemon --pid
${
PIDFILE
}
--name
${
NAME
}
${
GUNICORN_OPTS
}
"
case
"
$1
"
in
case
"
$1
"
in
start
)
start
)
echo
-n
"Starting SSO
S
erver
...
"
log_daemon_msg
"Starting SSO
s
erver"
check_dirs
check_dirs
start-stop-daemon
--start
--pidfile
${
PIDFILE
}
--make-pidfile
\
start-stop-daemon
--start
--oknodo
\
--background
--chuid
${
USER
}
--exec
${
DAEMON
}
--
--port
=
${
SSO_PORT
}
--pidfile
${
PIDFILE
}
\
echo
"ok"
--chuid
${
USER
}
\
--exec
${
GUNICORN
}
--
${
GUNICORN_OPTS
}
${
GUNICORN_APP
}
if
[
$?
-eq
0
]
;
then
log_success_msg
else
log_failure_msg
exit
1
fi
;;
;;
stop
)
stop
)
echo
-n
"Stopping SSO Server... "
log_daemon_msg
"Stopping SSO server"
start-stop-daemon
--stop
\
start-stop-daemon
--stop
--oknodo
--user
${
USER
}
--pidfile
${
PIDFILE
}
--pidfile
${
PIDFILE
}
&&
rm
-f
${
PIDFILE
}
if
[
$?
-eq
0
]
;
then
echo
"ok"
log_success_msg
else
log_failure_msg
fi
rm
-f
${
PIDFILE
}
2>/dev/null
;;
;;
reload
)
reload
)
echo
-n
"Reloading SSO
S
erver
...
"
log_daemon_msg
"Reloading SSO
s
erver"
kill
-HUP
`
cat
${
PIDFILE
}
`
kill
-HUP
`
cat
${
PIDFILE
}
`
echo
"ok"
log_success_msg
;;
;;
restart
)
restart
)
$0
stop
$0
stop
...
@@ -55,7 +80,8 @@ restart)
...
@@ -55,7 +80,8 @@ restart)
$0
start
$0
start
;;
;;
*
)
*
)
echo
-e
"Only [start|stop|reload|restart] operation are allowed
\n
"
echo
"Usage: /etc/init.d/ai-sso-server {start|stop|reload|restart}"
1>&2
exit
1
;;
;;
esac
esac
...
...
This diff is collapsed.
Click to expand it.
debian/changelog
+
7
−
0
View file @
ed0ae76a
ai-sso (2.0.1) unstable; urgency=low
* OTP support.
* Use 'gunicorn' for serving.
-- Autistici/Inventati <debian@autistici.org> Sun, 30 Mar 2014 11:35:20 +0100
ai-sso (2.0) unstable; urgency=low
ai-sso (2.0) unstable; urgency=low
* Source upgraded to version 2.0.
* Source upgraded to version 2.0.
...
...
This diff is collapsed.
Click to expand it.
debian/control
+
2
−
1
View file @
ed0ae76a
...
@@ -21,7 +21,8 @@ Description: A/I SSO Python modules.
...
@@ -21,7 +21,8 @@ Description: A/I SSO Python modules.
Package: ai-sso-server
Package: ai-sso-server
Architecture: all
Architecture: all
Depends: ai-sso, ai-sso-python, python-flask, ${python:Depends}
Depends: ai-sso, ai-sso-python, python-flask, gunicorn,
python-setproctitle, lsb-base, adduser, ${python:Depends}
Description: A/I SSO Server.
Description: A/I SSO Server.
The login server for the A/I SSO service.
The login server for the A/I SSO service.
...
...
This diff is collapsed.
Click to expand it.
ale
@ale
mentioned in issue
#4 (closed)
·
11 years ago
mentioned in issue
#4 (closed)
mentioned in issue #4
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment