Merge ~chris.macnaughton/ubuntu/+source/swift:master into ~ubuntu-server-dev/ubuntu/+source/swift:master
- Git
- lp:~chris.macnaughton/ubuntu/+source/swift
- master
- Merge into master
Proposed by
Chris MacNaughton
Status: | Merged |
---|---|
Merged at revision: | 09bc1fc74977767ced1243ea1191a4c68de7e2a1 |
Proposed branch: | ~chris.macnaughton/ubuntu/+source/swift:master |
Merge into: | ~ubuntu-server-dev/ubuntu/+source/swift:master |
Diff against target: |
2230 lines (+684/-33) 29 files modified
debian/changelog (+12/-0) debian/gen-init (+93/-0) debian/init-script-template (+148/-0) debian/rules (+22/-13) debian/swift-account-generator (+32/-0) debian/swift-account.install (+3/-0) debian/swift-account.swift-account-auditor.init.in (+17/-0) debian/swift-account.swift-account-reaper.init.in (+17/-0) debian/swift-account.swift-account-replicator.init.in (+17/-0) debian/swift-account.swift-account.init.in (+17/-0) debian/swift-container-generator (+32/-0) debian/swift-container.install (+3/-0) debian/swift-container.swift-container-auditor.init.in (+17/-0) debian/swift-container.swift-container-reconciler.init.in (+16/-0) debian/swift-container.swift-container-replicator.init.in (+17/-0) debian/swift-container.swift-container-sharder.init.in (+17/-0) debian/swift-container.swift-container-sync.init.in (+17/-0) debian/swift-container.swift-container-updater.init.in (+17/-0) debian/swift-container.swift-container.init.in (+17/-0) debian/swift-object-expirer.swift-object-expirer.init.in (+16/-0) debian/swift-object-generator (+32/-0) debian/swift-object.install (+3/-0) debian/swift-object.swift-object-auditor.init.in (+17/-0) debian/swift-object.swift-object-reconstructor.init.in (+17/-0) debian/swift-object.swift-object-replicator.init.in (+17/-0) debian/swift-object.swift-object-updater.init.in (+17/-0) debian/swift-object.swift-object.init.in (+17/-0) debian/swift-proxy.swift-proxy.init.in (+17/-0) dev/null (+0/-20) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Page | Approve | ||
Review via email: mp+385815@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
James Page (james-page) : | # |
Revision history for this message
James Page (james-page) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/debian/changelog b/debian/changelog | |||
2 | index 5753e39..611ff90 100644 | |||
3 | --- a/debian/changelog | |||
4 | +++ b/debian/changelog | |||
5 | @@ -1,3 +1,15 @@ | |||
6 | 1 | swift (2.25.0-0ubuntu2) UNRELEASED; urgency=medium | ||
7 | 2 | |||
8 | 3 | * Update to use Systemd unit files (LP: #1827340, LP: #1800676) | ||
9 | 4 | * d/*.init.in: Import init script (systemd) generation from Debian. | ||
10 | 5 | * d/*.upstart: Removed. | ||
11 | 6 | * d/*.init: Removed | ||
12 | 7 | * d/*.generator: Import from Debian. | ||
13 | 8 | * d/*.install: Added reference to generator files | ||
14 | 9 | * d/gen-init: Import from Debian. Remove WorkingDirectory. | ||
15 | 10 | |||
16 | 11 | -- Chris MacNaughton <chris.macnaughton@canonical.com> Thu, 11 Jun 2020 09:43:34 +0000 | ||
17 | 12 | |||
18 | 1 | swift (2.25.0-0ubuntu1) groovy; urgency=medium | 13 | swift (2.25.0-0ubuntu1) groovy; urgency=medium |
19 | 2 | 14 | ||
20 | 3 | * New upstream release for OpenStack Ussuri (LP: #1877642). | 15 | * New upstream release for OpenStack Ussuri (LP: #1877642). |
21 | diff --git a/debian/gen-init b/debian/gen-init | |||
22 | 4 | new file mode 100755 | 16 | new file mode 100755 |
23 | index 0000000..5583fbf | |||
24 | --- /dev/null | |||
25 | +++ b/debian/gen-init | |||
26 | @@ -0,0 +1,93 @@ | |||
27 | 1 | #!/bin/sh | ||
28 | 2 | |||
29 | 3 | INIT_TEMPLATE=${1} | ||
30 | 4 | |||
31 | 5 | # Get the variables defined in the init template | ||
32 | 6 | . ${INIT_TEMPLATE} | ||
33 | 7 | |||
34 | 8 | SYSTEM_USER=${PROJECT_NAME} | ||
35 | 9 | SYSTEM_GROUP=${PROJECT_NAME} | ||
36 | 10 | |||
37 | 11 | # Find out what should go in After= | ||
38 | 12 | SHOULD_START=`cat ${INIT_TEMPLATE} | grep "# Should-Start:" | sed 's/# Should-Start://'` | ||
39 | 13 | |||
40 | 14 | INIT_FILE=`echo ${INIT_TEMPLATE} | sed 's/.init.in/.init/'` | ||
41 | 15 | SERVICE_FILE=`echo ${INIT_TEMPLATE} | sed 's/.init.in/.service/'` | ||
42 | 16 | |||
43 | 17 | if [ -n "${SHOULD_START}" ] ; then | ||
44 | 18 | AFTER="After=" | ||
45 | 19 | for i in ${SHOULD_START} ; do | ||
46 | 20 | AFTER="${AFTER}${i}.service " | ||
47 | 21 | done | ||
48 | 22 | fi | ||
49 | 23 | |||
50 | 24 | if [ -n "$SYSTEMD_DOC" ] ; then | ||
51 | 25 | SYSTEMD_DOC="Documentation=$SYSTEMD_DOC" | ||
52 | 26 | fi | ||
53 | 27 | |||
54 | 28 | ######## | ||
55 | 29 | # init # | ||
56 | 30 | ######## | ||
57 | 31 | cp "$INIT_TEMPLATE" "$INIT_FILE" | ||
58 | 32 | cat debian/init-script-template >>"$INIT_FILE" | ||
59 | 33 | |||
60 | 34 | ########### | ||
61 | 35 | # systemd # | ||
62 | 36 | ########### | ||
63 | 37 | echo "[Unit] | ||
64 | 38 | Description=${DESC} | ||
65 | 39 | ConditionFileNotEmpty=/etc/${PROJECT_NAME}/${CONFIG}.conf | ||
66 | 40 | AssertFileNotEmpty=/etc/swift/account.ring.gz | ||
67 | 41 | AssertFileNotEmpty=/etc/swift/container.ring.gz | ||
68 | 42 | AssertPathExistsGlob=/etc/swift/object*.ring.gz | ||
69 | 43 | $SYSTEMD_DOC | ||
70 | 44 | $AFTER | ||
71 | 45 | |||
72 | 46 | [Service] | ||
73 | 47 | User=${SYSTEM_USER} | ||
74 | 48 | Group=${SYSTEM_GROUP} | ||
75 | 49 | CacheDirectory=${PROJECT_NAME} | ||
76 | 50 | RuntimeDirectory=${PROJECT_NAME} lock/${PROJECT_NAME} | ||
77 | 51 | ExecStart=/usr/bin/${NAME} /etc/${PROJECT_NAME}/${CONFIG}.conf | ||
78 | 52 | Restart=on-failure | ||
79 | 53 | LimitNOFILE=65535 | ||
80 | 54 | |||
81 | 55 | [Install] | ||
82 | 56 | WantedBy=multi-user.target | ||
83 | 57 | " >${SERVICE_FILE} | ||
84 | 58 | |||
85 | 59 | ############################## | ||
86 | 60 | |||
87 | 61 | if [ "$MULTI" ] ; then | ||
88 | 62 | |||
89 | 63 | SERVICE_FILE=`echo ${INIT_TEMPLATE} | sed 's/.init.in/@.service/'` | ||
90 | 64 | SERVICE_NAME=${INIT_TEMPLATE%.init.in} | ||
91 | 65 | SERVICE_NAME=${SERVICE_NAME##*/} | ||
92 | 66 | SERVICE_NAME=${SERVICE_NAME##*.} | ||
93 | 67 | |||
94 | 68 | echo "[Unit] | ||
95 | 69 | Description=${DESC} | ||
96 | 70 | PartOf=${SERVICE_NAME}.service | ||
97 | 71 | ReloadPropagatedFrom=${SERVICE_NAME}.service | ||
98 | 72 | ConditionFileNotEmpty=/etc/${PROJECT_NAME}/${CONFIG}/%i.conf | ||
99 | 73 | AssertFileNotEmpty=/etc/swift/account.ring.gz | ||
100 | 74 | AssertFileNotEmpty=/etc/swift/container.ring.gz | ||
101 | 75 | AssertPathExistsGlob=/etc/swift/object*.ring.gz | ||
102 | 76 | $SYSTEMD_DOC | ||
103 | 77 | $AFTER | ||
104 | 78 | |||
105 | 79 | [Service] | ||
106 | 80 | User=${SYSTEM_USER} | ||
107 | 81 | Group=${SYSTEM_GROUP} | ||
108 | 82 | WorkingDirectory=~ | ||
109 | 83 | CacheDirectory=${PROJECT_NAME} | ||
110 | 84 | RuntimeDirectory=${PROJECT_NAME} lock/${PROJECT_NAME} | ||
111 | 85 | ExecStart=/usr/bin/${NAME} /etc/${PROJECT_NAME}/${CONFIG}/%i.conf | ||
112 | 86 | Restart=on-failure | ||
113 | 87 | LimitNOFILE=65535 | ||
114 | 88 | |||
115 | 89 | [Install] | ||
116 | 90 | WantedBy=multi-user.target | ||
117 | 91 | " >${SERVICE_FILE} | ||
118 | 92 | |||
119 | 93 | fi | ||
120 | diff --git a/debian/init-script-template b/debian/init-script-template | |||
121 | 0 | new file mode 100644 | 94 | new file mode 100644 |
122 | index 0000000..f94491b | |||
123 | --- /dev/null | |||
124 | +++ b/debian/init-script-template | |||
125 | @@ -0,0 +1,148 @@ | |||
126 | 1 | #!/bin/sh | ||
127 | 2 | # The content after this line comes from Debian Swift source package | ||
128 | 3 | # and has been automatically added to a .init.in script, which | ||
129 | 4 | # contains only the descriptive part for the daemon. Everything | ||
130 | 5 | # else is standardized as a single unique script. | ||
131 | 6 | |||
132 | 7 | # Author: Thomas Goirand <zigo@debian.org> | ||
133 | 8 | # Author: Ondřej Nový <novy@ondrej.org> | ||
134 | 9 | |||
135 | 10 | # PATH should only include /usr/* if it runs after the mountnfs.sh script | ||
136 | 11 | PATH=/sbin:/usr/sbin:/bin:/usr/bin | ||
137 | 12 | |||
138 | 13 | DAEMON=/usr/bin/${NAME} | ||
139 | 14 | SYSTEM_USER=${PROJECT_NAME} | ||
140 | 15 | SYSTEM_GROUP=${PROJECT_NAME} | ||
141 | 16 | |||
142 | 17 | # Exit if the package is not installed | ||
143 | 18 | [ -x $DAEMON ] || exit 0 | ||
144 | 19 | |||
145 | 20 | # If ran as root, create /var/lock/X, /var/run/X and /var/cache/X as needed | ||
146 | 21 | if [ `whoami` = "root" ] ; then | ||
147 | 22 | for i in lock run cache ; do | ||
148 | 23 | mkdir -p /var/$i/${PROJECT_NAME} | ||
149 | 24 | chown ${SYSTEM_USER}:${SYSTEM_GROUP} /var/$i/${PROJECT_NAME} | ||
150 | 25 | done | ||
151 | 26 | fi | ||
152 | 27 | |||
153 | 28 | # This defines init_is_upstart which we use later on (+ more...) | ||
154 | 29 | . /lib/lsb/init-functions | ||
155 | 30 | |||
156 | 31 | RET=0 | ||
157 | 32 | |||
158 | 33 | # Configs | ||
159 | 34 | [ -r /etc/default/openstack ] && . /etc/default/openstack | ||
160 | 35 | [ -r /etc/default/$NAME ] && . /etc/default/$NAME | ||
161 | 36 | |||
162 | 37 | do_start() { | ||
163 | 38 | # Check for existence of ring files | ||
164 | 39 | if | ||
165 | 40 | [ ! -r /etc/swift/account.ring.gz ] || | ||
166 | 41 | [ ! -r /etc/swift/container.ring.gz ] || | ||
167 | 42 | test -z "$(find /etc/swift -maxdepth 1 -name 'object*.ring.gz' -print -quit)" ; then | ||
168 | 43 | log_end_msg 1 | ||
169 | 44 | exit $? | ||
170 | 45 | fi | ||
171 | 46 | |||
172 | 47 | STARTED= | ||
173 | 48 | for CONF_FILE in /etc/swift/${CONFIG}.conf /etc/swift/${CONFIG}/*.conf ; do | ||
174 | 49 | if [ ! -e "$CONF_FILE" ] ; then | ||
175 | 50 | continue | ||
176 | 51 | fi | ||
177 | 52 | |||
178 | 53 | SUFFIX=${CONF_FILE#/etc/swift/$CONFIG} | ||
179 | 54 | SUFFIX=${SUFFIX%.conf} | ||
180 | 55 | if [ "$SUFFIX" ] ; then | ||
181 | 56 | # /etc/swift/${NAME}/*.conf | ||
182 | 57 | SUFFIX=-${SUFFIX#/} | ||
183 | 58 | fi | ||
184 | 59 | PIDFILE=/var/run/${PROJECT_NAME}/${NAME}${SUFFIX}.pid | ||
185 | 60 | |||
186 | 61 | start-stop-daemon \ | ||
187 | 62 | --start \ | ||
188 | 63 | --quiet \ | ||
189 | 64 | --background \ | ||
190 | 65 | --chuid ${SYSTEM_USER}:${SYSTEM_GROUP} \ | ||
191 | 66 | --make-pidfile \ | ||
192 | 67 | --pidfile ${PIDFILE} \ | ||
193 | 68 | --chdir /var/lib/${PROJECT_NAME} \ | ||
194 | 69 | --startas $DAEMON \ | ||
195 | 70 | --test > /dev/null \ | ||
196 | 71 | || return 1 | ||
197 | 72 | start-stop-daemon \ | ||
198 | 73 | --start \ | ||
199 | 74 | --quiet \ | ||
200 | 75 | --background \ | ||
201 | 76 | --chuid ${SYSTEM_USER}:${SYSTEM_GROUP} \ | ||
202 | 77 | --make-pidfile \ | ||
203 | 78 | --pidfile ${PIDFILE} \ | ||
204 | 79 | --chdir /var/lib/${PROJECT_NAME} \ | ||
205 | 80 | --startas $DAEMON \ | ||
206 | 81 | -- $CONF_FILE \ | ||
207 | 82 | || return 2 | ||
208 | 83 | |||
209 | 84 | STARTED=1 | ||
210 | 85 | done | ||
211 | 86 | |||
212 | 87 | if [ ! "$STARTED" ] ; then | ||
213 | 88 | return 2 | ||
214 | 89 | fi | ||
215 | 90 | } | ||
216 | 91 | |||
217 | 92 | do_stop() { | ||
218 | 93 | for PIDFILE in /var/run/${PROJECT_NAME}/${NAME}*.pid ; do | ||
219 | 94 | start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE | ||
220 | 95 | RETVAL=$? | ||
221 | 96 | rm -f $PIDFILE | ||
222 | 97 | if [ "$RETVAL" != "0" ] ; then | ||
223 | 98 | return "$RETVAL" | ||
224 | 99 | fi | ||
225 | 100 | done | ||
226 | 101 | } | ||
227 | 102 | |||
228 | 103 | case "$1" in | ||
229 | 104 | start) | ||
230 | 105 | #init_is_upstart > /dev/null 2>&1 && exit 1 | ||
231 | 106 | log_daemon_msg "Starting $DESC" "$NAME" | ||
232 | 107 | do_start | ||
233 | 108 | case $? in | ||
234 | 109 | 0|1) log_end_msg 0 ; RET=$? ;; | ||
235 | 110 | 2) log_end_msg 1 ; RET=$? ;; | ||
236 | 111 | esac | ||
237 | 112 | ;; | ||
238 | 113 | stop) | ||
239 | 114 | #init_is_upstart > /dev/null 2>&1 && exit 0 | ||
240 | 115 | log_daemon_msg "Stopping $DESC" "$NAME" | ||
241 | 116 | do_stop | ||
242 | 117 | case $? in | ||
243 | 118 | 0|1) log_end_msg 0 ; RET=$? ;; | ||
244 | 119 | 2) log_end_msg 1 ; RET=$? ;; | ||
245 | 120 | esac | ||
246 | 121 | ;; | ||
247 | 122 | status) | ||
248 | 123 | status_of_proc "$DAEMON" "$NAME" | ||
249 | 124 | RET=$? | ||
250 | 125 | ;; | ||
251 | 126 | restart|force-reload) | ||
252 | 127 | #init_is_upstart > /dev/null 2>&1 && exit 1 | ||
253 | 128 | log_daemon_msg "Restarting $DESC" "$NAME" | ||
254 | 129 | do_stop | ||
255 | 130 | case $? in | ||
256 | 131 | 0|1) | ||
257 | 132 | do_start | ||
258 | 133 | case $? in | ||
259 | 134 | 0) log_end_msg 0 ; RET=$? ;; | ||
260 | 135 | 1) log_end_msg 1 ; RET=$? ;; # Old process is still running | ||
261 | 136 | *) log_end_msg 1 ; RET=$? ;; # Failed to start | ||
262 | 137 | esac | ||
263 | 138 | ;; | ||
264 | 139 | *) log_end_msg 1 ; RET=$? ;; # Failed to stop | ||
265 | 140 | esac | ||
266 | 141 | ;; | ||
267 | 142 | *) | ||
268 | 143 | echo "Usage: $0 {start|stop|status|restart|force-reload}" >&2 | ||
269 | 144 | RET=3 | ||
270 | 145 | ;; | ||
271 | 146 | esac | ||
272 | 147 | |||
273 | 148 | exit $RET | ||
274 | diff --git a/debian/rules b/debian/rules | |||
275 | index 407b4ef..611dbb1 100755 | |||
276 | --- a/debian/rules | |||
277 | +++ b/debian/rules | |||
278 | @@ -34,11 +34,18 @@ endif | |||
279 | 34 | get-orig-source: | 34 | get-orig-source: |
280 | 35 | uscan --verbose --force-download --rename --destdir=../build-area | 35 | uscan --verbose --force-download --rename --destdir=../build-area |
281 | 36 | 36 | ||
282 | 37 | override_dh_auto_build: | ||
283 | 38 | dh_auto_build | ||
284 | 39 | set -e ; set -x ; \ | ||
285 | 40 | for i in $(sort $(wildcard debian/*.init.in)) ; do \ | ||
286 | 41 | debian/gen-init $$i ; \ | ||
287 | 42 | done | ||
288 | 43 | |||
289 | 37 | override_dh_auto_install: | 44 | override_dh_auto_install: |
290 | 38 | pkgos-dh_auto_install --no-py2 --in-tmp | 45 | pkgos-dh_auto_install --no-py2 --in-tmp |
291 | 39 | 46 | ||
292 | 40 | override_dh_install: | 47 | override_dh_install: |
294 | 41 | dh_install --sourcedir=debian/tmp | 48 | dh_install --sourcedir=debian/tmp -Xdebian/swift-account-generator -Xdebian/swift-object-generator -Xdebian/swift-container-generator |
295 | 42 | dh_missing --fail-missing | 49 | dh_missing --fail-missing |
296 | 43 | install -D -m 0640 $(CURDIR)/debian/account-server.conf $(CURDIR)/debian/python3-swift/etc/swift/account-server.conf | 50 | install -D -m 0640 $(CURDIR)/debian/account-server.conf $(CURDIR)/debian/python3-swift/etc/swift/account-server.conf |
297 | 44 | install -D -m 0640 $(CURDIR)/debian/container-server.conf $(CURDIR)/debian/python3-swift/etc/swift/container-server.conf | 51 | install -D -m 0640 $(CURDIR)/debian/container-server.conf $(CURDIR)/debian/python3-swift/etc/swift/container-server.conf |
298 | @@ -46,18 +53,20 @@ override_dh_install: | |||
299 | 46 | install -D -m 0640 $(CURDIR)/debian/object-expirer.conf $(CURDIR)/debian/python3-swift/etc/swift/object-expirer.conf | 53 | install -D -m 0640 $(CURDIR)/debian/object-expirer.conf $(CURDIR)/debian/python3-swift/etc/swift/object-expirer.conf |
300 | 47 | 54 | ||
301 | 48 | override_dh_installinit: | 55 | override_dh_installinit: |
314 | 49 | dh_installinit --no-start | 56 | set -e ; set -x ; \ |
315 | 50 | dh_installinit --no-start -pswift-container --name=swift-container-replicator | 57 | for FILE in $(sort $(patsubst debian/%,%,$(wildcard debian/*.init))) ; do \ |
316 | 51 | dh_installinit --no-start -pswift-container --name=swift-container-auditor | 58 | PKG=`echo $$FILE | cut -d. -f1` ; \ |
317 | 52 | dh_installinit --no-start -pswift-container --name=swift-container-updater | 59 | NAME=`echo $$FILE | cut -d. -f2` ; \ |
318 | 53 | dh_installinit --no-start -pswift-container --name=swift-container-sync | 60 | dh_installinit --error-handler=true -p$$PKG --name=$$NAME ;\ |
319 | 54 | dh_installinit --no-start -pswift-account --name=swift-account-replicator | 61 | done |
320 | 55 | dh_installinit --no-start -pswift-account --name=swift-account-auditor | 62 | |
321 | 56 | dh_installinit --no-start -pswift-account --name=swift-account-reaper | 63 | override_dh_installsystemd: |
322 | 57 | dh_installinit --no-start -pswift-object --name=swift-object-replicator | 64 | set -e ; set -x ; \ |
323 | 58 | dh_installinit --no-start -pswift-object --name=swift-object-auditor | 65 | for FILE in $(sort $(patsubst debian/%,%,$(wildcard debian/*.service))) ; do \ |
324 | 59 | dh_installinit --no-start -pswift-object --name=swift-object-updater | 66 | PKG=`echo $$FILE | cut -d. -f1` ; \ |
325 | 60 | dh_installinit --no-start -pswift-object --name=swift-object-reconstructor | 67 | NAME=`echo $$FILE | cut -d. -f2` ; \ |
326 | 68 | dh_installsystemd -p$$PKG --name=$$NAME ;\ | ||
327 | 69 | done | ||
328 | 61 | 70 | ||
329 | 62 | override_dh_compress: | 71 | override_dh_compress: |
330 | 63 | dh_compress -Xconf-sample | 72 | dh_compress -Xconf-sample |
331 | diff --git a/debian/swift-account-generator b/debian/swift-account-generator | |||
332 | 64 | new file mode 100755 | 73 | new file mode 100755 |
333 | index 0000000..955c6e4 | |||
334 | --- /dev/null | |||
335 | +++ b/debian/swift-account-generator | |||
336 | @@ -0,0 +1,32 @@ | |||
337 | 1 | #!/bin/sh | ||
338 | 2 | |||
339 | 3 | # This systemd generator creates dependency symlinks that make all | ||
340 | 4 | # Swift account servers be started/stopped/reloaded | ||
341 | 5 | # when swift-account*.service is started/stopped/reloaded. | ||
342 | 6 | |||
343 | 7 | set -eu | ||
344 | 8 | |||
345 | 9 | GENDIR="$1" | ||
346 | 10 | LIBDIR="/lib/systemd/system" | ||
347 | 11 | CONFIG=/etc/swift/account-server | ||
348 | 12 | |||
349 | 13 | if [ ! -d "$CONFIG" ] ; then | ||
350 | 14 | # Single config mode | ||
351 | 15 | exit 0 | ||
352 | 16 | fi | ||
353 | 17 | |||
354 | 18 | for NAME in $CONFIG/* ; do | ||
355 | 19 | NAME=${NAME#$CONFIG} | ||
356 | 20 | NAME=${NAME#/} | ||
357 | 21 | NAME=${NAME%.conf} | ||
358 | 22 | |||
359 | 23 | for i in account account-auditor account-reaper account-replicator ; do | ||
360 | 24 | mkdir -p "$GENDIR/swift-$i.service.wants" | ||
361 | 25 | ln -s \ | ||
362 | 26 | "$LIBDIR/swift-$i@.service" \ | ||
363 | 27 | "$GENDIR/swift-$i.service.wants/swift-$i@$NAME.service" | ||
364 | 28 | done | ||
365 | 29 | done | ||
366 | 30 | |||
367 | 31 | exit 0 | ||
368 | 32 | |||
369 | diff --git a/debian/swift-account.init b/debian/swift-account.init | |||
370 | 0 | deleted file mode 100644 | 33 | deleted file mode 100644 |
371 | index 3eadb88..0000000 | |||
372 | --- a/debian/swift-account.init | |||
373 | +++ /dev/null | |||
374 | @@ -1,49 +0,0 @@ | |||
375 | 1 | #! /bin/sh | ||
376 | 2 | ### BEGIN INIT INFO | ||
377 | 3 | # Provides: swift-account | ||
378 | 4 | # Required-Start: $remote_fs | ||
379 | 5 | # Required-Stop: $remote_fs | ||
380 | 6 | # Default-Start: 2 3 4 5 | ||
381 | 7 | # Default-Stop: 0 1 6 | ||
382 | 8 | # Short-Description: Swift account server | ||
383 | 9 | # Description: Account server for swift. | ||
384 | 10 | ### END INIT INFO | ||
385 | 11 | |||
386 | 12 | SERVICE_NAME="account-server" | ||
387 | 13 | PRINT_NAME="Swift account server" | ||
388 | 14 | |||
389 | 15 | . /lib/lsb/init-functions | ||
390 | 16 | |||
391 | 17 | if ! [ -x /usr/bin/swift-init ] ; then | ||
392 | 18 | exit 0 | ||
393 | 19 | fi | ||
394 | 20 | |||
395 | 21 | if ! [ -f "/etc/swift/account-server.conf" ] ; then | ||
396 | 22 | exit 6 | ||
397 | 23 | fi | ||
398 | 24 | |||
399 | 25 | case "$1" in | ||
400 | 26 | start) | ||
401 | 27 | log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
402 | 28 | /usr/bin/swift-init ${SERVICE_NAME} start | ||
403 | 29 | log_end_msg $? | ||
404 | 30 | ;; | ||
405 | 31 | stop) | ||
406 | 32 | log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
407 | 33 | /usr/bin/swift-init ${SERVICE_NAME} stop | ||
408 | 34 | log_end_msg $? | ||
409 | 35 | ;; | ||
410 | 36 | restart|force-reload|reload) | ||
411 | 37 | log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
412 | 38 | /usr/bin/swift-init ${SERVICE_NAME} reload | ||
413 | 39 | ;; | ||
414 | 40 | status) | ||
415 | 41 | exec /usr/bin/swift-init ${SERVICE_NAME} status | ||
416 | 42 | ;; | ||
417 | 43 | *) | ||
418 | 44 | echo "Usage: $0 {start|stop|restart|reload}" | ||
419 | 45 | exit 1 | ||
420 | 46 | ;; | ||
421 | 47 | esac | ||
422 | 48 | |||
423 | 49 | exit 0 | ||
424 | diff --git a/debian/swift-account.install b/debian/swift-account.install | |||
425 | index 576f829..2e6419a 100644 | |||
426 | --- a/debian/swift-account.install | |||
427 | +++ b/debian/swift-account.install | |||
428 | @@ -1,3 +1,6 @@ | |||
429 | 1 | #! /usr/bin/dh-exec --with=install | ||
430 | 2 | debian/swift-account-generator /lib/systemd/system-generators | ||
431 | 3 | |||
432 | 1 | usr/bin/swift-account-audit | 4 | usr/bin/swift-account-audit |
433 | 2 | usr/bin/swift-account-auditor | 5 | usr/bin/swift-account-auditor |
434 | 3 | usr/bin/swift-account-info | 6 | usr/bin/swift-account-info |
435 | diff --git a/debian/swift-account.swift-account-auditor.init b/debian/swift-account.swift-account-auditor.init | |||
436 | 4 | deleted file mode 100644 | 7 | deleted file mode 100644 |
437 | index 2cb92b4..0000000 | |||
438 | --- a/debian/swift-account.swift-account-auditor.init | |||
439 | +++ /dev/null | |||
440 | @@ -1,49 +0,0 @@ | |||
441 | 1 | #! /bin/sh | ||
442 | 2 | ### BEGIN INIT INFO | ||
443 | 3 | # Provides: swift-account-auditor | ||
444 | 4 | # Required-Start: $remote_fs | ||
445 | 5 | # Required-Stop: $remote_fs | ||
446 | 6 | # Default-Start: 2 3 4 5 | ||
447 | 7 | # Default-Stop: 0 1 6 | ||
448 | 8 | # Short-Description: Swift account auditor | ||
449 | 9 | # Description: Account auditor for swift. | ||
450 | 10 | ### END INIT INFO | ||
451 | 11 | |||
452 | 12 | SERVICE_NAME="account-auditor" | ||
453 | 13 | PRINT_NAME="Swift account auditor" | ||
454 | 14 | |||
455 | 15 | . /lib/lsb/init-functions | ||
456 | 16 | |||
457 | 17 | if ! [ -x /usr/bin/swift-init ] ; then | ||
458 | 18 | exit 0 | ||
459 | 19 | fi | ||
460 | 20 | |||
461 | 21 | if ! [ -f "/etc/swift/account-server.conf" ] ; then | ||
462 | 22 | exit 6 | ||
463 | 23 | fi | ||
464 | 24 | |||
465 | 25 | case "$1" in | ||
466 | 26 | start) | ||
467 | 27 | log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
468 | 28 | /usr/bin/swift-init ${SERVICE_NAME} start | ||
469 | 29 | log_end_msg $? | ||
470 | 30 | ;; | ||
471 | 31 | stop) | ||
472 | 32 | log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
473 | 33 | /usr/bin/swift-init ${SERVICE_NAME} stop | ||
474 | 34 | log_end_msg $? | ||
475 | 35 | ;; | ||
476 | 36 | restart|force-reload|reload) | ||
477 | 37 | log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
478 | 38 | /usr/bin/swift-init ${SERVICE_NAME} reload | ||
479 | 39 | ;; | ||
480 | 40 | status) | ||
481 | 41 | exec /usr/bin/swift-init ${SERVICE_NAME} status | ||
482 | 42 | ;; | ||
483 | 43 | *) | ||
484 | 44 | echo "Usage: $0 {start|stop|restart|reload}" | ||
485 | 45 | exit 1 | ||
486 | 46 | ;; | ||
487 | 47 | esac | ||
488 | 48 | |||
489 | 49 | exit 0 | ||
490 | diff --git a/debian/swift-account.swift-account-auditor.init.in b/debian/swift-account.swift-account-auditor.init.in | |||
491 | 50 | new file mode 100644 | 0 | new file mode 100644 |
492 | index 0000000..8289a92 | |||
493 | --- /dev/null | |||
494 | +++ b/debian/swift-account.swift-account-auditor.init.in | |||
495 | @@ -0,0 +1,17 @@ | |||
496 | 1 | #! /bin/sh | ||
497 | 2 | ### BEGIN INIT INFO | ||
498 | 3 | # Provides: swift-account-auditor | ||
499 | 4 | # Required-Start: $remote_fs | ||
500 | 5 | # Required-Stop: $remote_fs | ||
501 | 6 | # Default-Start: 2 3 4 5 | ||
502 | 7 | # Default-Stop: 0 1 6 | ||
503 | 8 | # Short-Description: Swift account auditor | ||
504 | 9 | # Description: Account auditor server for Swift. | ||
505 | 10 | ### END INIT INFO | ||
506 | 11 | |||
507 | 12 | PROJECT_NAME=swift | ||
508 | 13 | NAME="${PROJECT_NAME}-account-auditor" | ||
509 | 14 | DESC="OpenStack Swift account auditor" | ||
510 | 15 | CONFIG=account-server | ||
511 | 16 | MULTI=1 | ||
512 | 17 | SYSTEMD_DOC="man:${NAME}(1)" | ||
513 | diff --git a/debian/swift-account.swift-account-auditor.upstart b/debian/swift-account.swift-account-auditor.upstart | |||
514 | 0 | deleted file mode 100644 | 18 | deleted file mode 100644 |
515 | index d490395..0000000 | |||
516 | --- a/debian/swift-account.swift-account-auditor.upstart | |||
517 | +++ /dev/null | |||
518 | @@ -1,20 +0,0 @@ | |||
519 | 1 | # swift-account-auditor - SWIFT Account Auditor | ||
520 | 2 | # | ||
521 | 3 | # The swift account auditor. | ||
522 | 4 | |||
523 | 5 | description "SWIFT Account Auditor" | ||
524 | 6 | author "Marc Cluet <marc.cluet@ubuntu.com>" | ||
525 | 7 | |||
526 | 8 | start on runlevel [2345] | ||
527 | 9 | stop on runlevel [016] | ||
528 | 10 | |||
529 | 11 | pre-start script | ||
530 | 12 | if [ -f "/etc/swift/account-server.conf" ]; then | ||
531 | 13 | exec /usr/bin/swift-init account-auditor start | ||
532 | 14 | else | ||
533 | 15 | exit 1 | ||
534 | 16 | fi | ||
535 | 17 | end script | ||
536 | 18 | |||
537 | 19 | post-stop exec /usr/bin/swift-init account-auditor stop | ||
538 | 20 | |||
539 | diff --git a/debian/swift-account.swift-account-reaper.init b/debian/swift-account.swift-account-reaper.init | |||
540 | 21 | deleted file mode 100644 | 0 | deleted file mode 100644 |
541 | index 4e39ab0..0000000 | |||
542 | --- a/debian/swift-account.swift-account-reaper.init | |||
543 | +++ /dev/null | |||
544 | @@ -1,49 +0,0 @@ | |||
545 | 1 | #! /bin/sh | ||
546 | 2 | ### BEGIN INIT INFO | ||
547 | 3 | # Provides: swift-account-reaper | ||
548 | 4 | # Required-Start: $remote_fs | ||
549 | 5 | # Required-Stop: $remote_fs | ||
550 | 6 | # Default-Start: 2 3 4 5 | ||
551 | 7 | # Default-Stop: 0 1 6 | ||
552 | 8 | # Short-Description: Swift account reaper | ||
553 | 9 | # Description: Account reaper for swift. | ||
554 | 10 | ### END INIT INFO | ||
555 | 11 | |||
556 | 12 | SERVICE_NAME="account-reaper" | ||
557 | 13 | PRINT_NAME="Swift account reaper" | ||
558 | 14 | |||
559 | 15 | . /lib/lsb/init-functions | ||
560 | 16 | |||
561 | 17 | if ! [ -x /usr/bin/swift-init ] ; then | ||
562 | 18 | exit 0 | ||
563 | 19 | fi | ||
564 | 20 | |||
565 | 21 | if ! [ -f "/etc/swift/account-server.conf" ] ; then | ||
566 | 22 | exit 6 | ||
567 | 23 | fi | ||
568 | 24 | |||
569 | 25 | case "$1" in | ||
570 | 26 | start) | ||
571 | 27 | log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
572 | 28 | /usr/bin/swift-init ${SERVICE_NAME} start | ||
573 | 29 | log_end_msg $? | ||
574 | 30 | ;; | ||
575 | 31 | stop) | ||
576 | 32 | log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
577 | 33 | /usr/bin/swift-init ${SERVICE_NAME} stop | ||
578 | 34 | log_end_msg $? | ||
579 | 35 | ;; | ||
580 | 36 | restart|force-reload|reload) | ||
581 | 37 | log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
582 | 38 | /usr/bin/swift-init ${SERVICE_NAME} reload | ||
583 | 39 | ;; | ||
584 | 40 | status) | ||
585 | 41 | exec /usr/bin/swift-init ${SERVICE_NAME} status | ||
586 | 42 | ;; | ||
587 | 43 | *) | ||
588 | 44 | echo "Usage: $0 {start|stop|restart|reload}" | ||
589 | 45 | exit 1 | ||
590 | 46 | ;; | ||
591 | 47 | esac | ||
592 | 48 | |||
593 | 49 | exit 0 | ||
594 | diff --git a/debian/swift-account.swift-account-reaper.init.in b/debian/swift-account.swift-account-reaper.init.in | |||
595 | 50 | new file mode 100644 | 0 | new file mode 100644 |
596 | index 0000000..ee73f62 | |||
597 | --- /dev/null | |||
598 | +++ b/debian/swift-account.swift-account-reaper.init.in | |||
599 | @@ -0,0 +1,17 @@ | |||
600 | 1 | #! /bin/sh | ||
601 | 2 | ### BEGIN INIT INFO | ||
602 | 3 | # Provides: swift-account-reaper | ||
603 | 4 | # Required-Start: $remote_fs | ||
604 | 5 | # Required-Stop: $remote_fs | ||
605 | 6 | # Default-Start: 2 3 4 5 | ||
606 | 7 | # Default-Stop: 0 1 6 | ||
607 | 8 | # Short-Description: Swift account reaper | ||
608 | 9 | # Description: Account reaper for Swift. | ||
609 | 10 | ### END INIT INFO | ||
610 | 11 | |||
611 | 12 | PROJECT_NAME=swift | ||
612 | 13 | NAME="${PROJECT_NAME}-account-reaper" | ||
613 | 14 | DESC="OpenStack Swift account reaper" | ||
614 | 15 | CONFIG=account-server | ||
615 | 16 | MULTI=1 | ||
616 | 17 | SYSTEMD_DOC="man:${NAME}(1)" | ||
617 | diff --git a/debian/swift-account.swift-account-reaper.upstart b/debian/swift-account.swift-account-reaper.upstart | |||
618 | 0 | deleted file mode 100644 | 18 | deleted file mode 100644 |
619 | index a86ff6f..0000000 | |||
620 | --- a/debian/swift-account.swift-account-reaper.upstart | |||
621 | +++ /dev/null | |||
622 | @@ -1,20 +0,0 @@ | |||
623 | 1 | # swift-account-reaper - SWIFT Account Reaper | ||
624 | 2 | # | ||
625 | 3 | # The swift account reaper. | ||
626 | 4 | |||
627 | 5 | description "SWIFT Account Reaper" | ||
628 | 6 | author "Marc Cluet <marc.cluet@ubuntu.com>" | ||
629 | 7 | |||
630 | 8 | start on runlevel [2345] | ||
631 | 9 | stop on runlevel [016] | ||
632 | 10 | |||
633 | 11 | pre-start script | ||
634 | 12 | if [ -f "/etc/swift/account-server.conf" ]; then | ||
635 | 13 | exec /usr/bin/swift-init account-reaper start | ||
636 | 14 | else | ||
637 | 15 | exit 1 | ||
638 | 16 | fi | ||
639 | 17 | end script | ||
640 | 18 | |||
641 | 19 | post-stop exec /usr/bin/swift-init account-reaper stop | ||
642 | 20 | |||
643 | diff --git a/debian/swift-account.swift-account-replicator.init b/debian/swift-account.swift-account-replicator.init | |||
644 | 21 | deleted file mode 100644 | 0 | deleted file mode 100644 |
645 | index 2effcba..0000000 | |||
646 | --- a/debian/swift-account.swift-account-replicator.init | |||
647 | +++ /dev/null | |||
648 | @@ -1,49 +0,0 @@ | |||
649 | 1 | #! /bin/sh | ||
650 | 2 | ### BEGIN INIT INFO | ||
651 | 3 | # Provides: swift-account-replicator | ||
652 | 4 | # Required-Start: $remote_fs | ||
653 | 5 | # Required-Stop: $remote_fs | ||
654 | 6 | # Default-Start: 2 3 4 5 | ||
655 | 7 | # Default-Stop: 0 1 6 | ||
656 | 8 | # Short-Description: Swift account replicator | ||
657 | 9 | # Description: Account replicator for swift. | ||
658 | 10 | ### END INIT INFO | ||
659 | 11 | |||
660 | 12 | SERVICE_NAME="account-replicator" | ||
661 | 13 | PRINT_NAME="Swift account replicator" | ||
662 | 14 | |||
663 | 15 | . /lib/lsb/init-functions | ||
664 | 16 | |||
665 | 17 | if ! [ -x /usr/bin/swift-init ] ; then | ||
666 | 18 | exit 0 | ||
667 | 19 | fi | ||
668 | 20 | |||
669 | 21 | if ! [ -f "/etc/swift/account-server.conf" ] ; then | ||
670 | 22 | exit 6 | ||
671 | 23 | fi | ||
672 | 24 | |||
673 | 25 | case "$1" in | ||
674 | 26 | start) | ||
675 | 27 | log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
676 | 28 | /usr/bin/swift-init ${SERVICE_NAME} start | ||
677 | 29 | log_end_msg $? | ||
678 | 30 | ;; | ||
679 | 31 | stop) | ||
680 | 32 | log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
681 | 33 | /usr/bin/swift-init ${SERVICE_NAME} stop | ||
682 | 34 | log_end_msg $? | ||
683 | 35 | ;; | ||
684 | 36 | restart|force-reload|reload) | ||
685 | 37 | log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
686 | 38 | /usr/bin/swift-init ${SERVICE_NAME} reload | ||
687 | 39 | ;; | ||
688 | 40 | status) | ||
689 | 41 | exec /usr/bin/swift-init ${SERVICE_NAME} status | ||
690 | 42 | ;; | ||
691 | 43 | *) | ||
692 | 44 | echo "Usage: $0 {start|stop|restart|reload}" | ||
693 | 45 | exit 1 | ||
694 | 46 | ;; | ||
695 | 47 | esac | ||
696 | 48 | |||
697 | 49 | exit 0 | ||
698 | diff --git a/debian/swift-account.swift-account-replicator.init.in b/debian/swift-account.swift-account-replicator.init.in | |||
699 | 50 | new file mode 100644 | 0 | new file mode 100644 |
700 | index 0000000..d590827 | |||
701 | --- /dev/null | |||
702 | +++ b/debian/swift-account.swift-account-replicator.init.in | |||
703 | @@ -0,0 +1,17 @@ | |||
704 | 1 | #! /bin/sh | ||
705 | 2 | ### BEGIN INIT INFO | ||
706 | 3 | # Provides: swift-account-replicator | ||
707 | 4 | # Required-Start: $remote_fs | ||
708 | 5 | # Required-Stop: $remote_fs | ||
709 | 6 | # Default-Start: 2 3 4 5 | ||
710 | 7 | # Default-Stop: 0 1 6 | ||
711 | 8 | # Short-Description: Swift account replicator | ||
712 | 9 | # Description: Account replicator for Swift. | ||
713 | 10 | ### END INIT INFO | ||
714 | 11 | |||
715 | 12 | PROJECT_NAME=swift | ||
716 | 13 | NAME="${PROJECT_NAME}-account-replicator" | ||
717 | 14 | DESC="OpenStack Swift account replicator" | ||
718 | 15 | CONFIG=account-server | ||
719 | 16 | MULTI=1 | ||
720 | 17 | SYSTEMD_DOC="man:${NAME}(1)" | ||
721 | diff --git a/debian/swift-account.swift-account-replicator.upstart b/debian/swift-account.swift-account-replicator.upstart | |||
722 | 0 | deleted file mode 100644 | 18 | deleted file mode 100644 |
723 | index 874da6e..0000000 | |||
724 | --- a/debian/swift-account.swift-account-replicator.upstart | |||
725 | +++ /dev/null | |||
726 | @@ -1,20 +0,0 @@ | |||
727 | 1 | # swift-account-replicator - SWIFT Account Replicator | ||
728 | 2 | # | ||
729 | 3 | # The swift account replicator. | ||
730 | 4 | |||
731 | 5 | description "SWIFT Account Replicator" | ||
732 | 6 | author "Marc Cluet <marc.cluet@ubuntu.com>" | ||
733 | 7 | |||
734 | 8 | start on runlevel [2345] | ||
735 | 9 | stop on runlevel [016] | ||
736 | 10 | |||
737 | 11 | pre-start script | ||
738 | 12 | if [ -f "/etc/swift/account-server.conf" ]; then | ||
739 | 13 | exec /usr/bin/swift-init account-replicator start | ||
740 | 14 | else | ||
741 | 15 | exit 1 | ||
742 | 16 | fi | ||
743 | 17 | end script | ||
744 | 18 | |||
745 | 19 | post-stop exec /usr/bin/swift-init account-replicator stop | ||
746 | 20 | |||
747 | diff --git a/debian/swift-account.swift-account.init.in b/debian/swift-account.swift-account.init.in | |||
748 | 21 | new file mode 100644 | 0 | new file mode 100644 |
749 | index 0000000..3f53057 | |||
750 | --- /dev/null | |||
751 | +++ b/debian/swift-account.swift-account.init.in | |||
752 | @@ -0,0 +1,17 @@ | |||
753 | 1 | #! /bin/sh | ||
754 | 2 | ### BEGIN INIT INFO | ||
755 | 3 | # Provides: swift-account | ||
756 | 4 | # Required-Start: $remote_fs | ||
757 | 5 | # Required-Stop: $remote_fs | ||
758 | 6 | # Default-Start: 2 3 4 5 | ||
759 | 7 | # Default-Stop: 0 1 6 | ||
760 | 8 | # Short-Description: Swift account server | ||
761 | 9 | # Description: Account server for Swift. | ||
762 | 10 | ### END INIT INFO | ||
763 | 11 | |||
764 | 12 | PROJECT_NAME=swift | ||
765 | 13 | NAME="${PROJECT_NAME}-account-server" | ||
766 | 14 | DESC="OpenStack Swift account server" | ||
767 | 15 | CONFIG=account-server | ||
768 | 16 | MULTI=1 | ||
769 | 17 | SYSTEMD_DOC="man:${NAME}(1)" | ||
770 | diff --git a/debian/swift-account.upstart b/debian/swift-account.upstart | |||
771 | 0 | deleted file mode 100644 | 18 | deleted file mode 100644 |
772 | index f1d15f2..0000000 | |||
773 | --- a/debian/swift-account.upstart | |||
774 | +++ /dev/null | |||
775 | @@ -1,20 +0,0 @@ | |||
776 | 1 | # swift-account-server - SWIFT Account Server | ||
777 | 2 | # | ||
778 | 3 | # The swift account server. | ||
779 | 4 | |||
780 | 5 | description "SWIFT Account Server" | ||
781 | 6 | author "Marc Cluet <marc.cluet@ubuntu.com>" | ||
782 | 7 | |||
783 | 8 | start on runlevel [2345] | ||
784 | 9 | stop on runlevel [016] | ||
785 | 10 | |||
786 | 11 | pre-start script | ||
787 | 12 | if [ -f "/etc/swift/account-server.conf" ]; then | ||
788 | 13 | exec /usr/bin/swift-init account-server start | ||
789 | 14 | else | ||
790 | 15 | exit 1 | ||
791 | 16 | fi | ||
792 | 17 | end script | ||
793 | 18 | |||
794 | 19 | post-stop exec /usr/bin/swift-init account-server stop | ||
795 | 20 | |||
796 | diff --git a/debian/swift-container-generator b/debian/swift-container-generator | |||
797 | 21 | new file mode 100755 | 0 | new file mode 100755 |
798 | index 0000000..51e9515 | |||
799 | --- /dev/null | |||
800 | +++ b/debian/swift-container-generator | |||
801 | @@ -0,0 +1,32 @@ | |||
802 | 1 | #!/bin/sh | ||
803 | 2 | |||
804 | 3 | # This systemd generator creates dependency symlinks that make all | ||
805 | 4 | # Swift account servers be started/stopped/reloaded | ||
806 | 5 | # when swift-account*.service is started/stopped/reloaded. | ||
807 | 6 | |||
808 | 7 | set -eu | ||
809 | 8 | |||
810 | 9 | GENDIR="$1" | ||
811 | 10 | LIBDIR="/lib/systemd/system" | ||
812 | 11 | CONFIG=/etc/swift/account-server | ||
813 | 12 | |||
814 | 13 | if [ ! -d "$CONFIG" ] ; then | ||
815 | 14 | # Single config mode | ||
816 | 15 | exit 0 | ||
817 | 16 | fi | ||
818 | 17 | |||
819 | 18 | for NAME in $CONFIG/* ; do | ||
820 | 19 | NAME=${NAME#$CONFIG} | ||
821 | 20 | NAME=${NAME#/} | ||
822 | 21 | NAME=${NAME%.conf} | ||
823 | 22 | |||
824 | 23 | for i in container container-auditor container-replicator container-sharder container-sync container-updater ; do | ||
825 | 24 | mkdir -p "$GENDIR/swift-$i.service.wants" | ||
826 | 25 | ln -s \ | ||
827 | 26 | "$LIBDIR/swift-$i@.service" \ | ||
828 | 27 | "$GENDIR/swift-$i.service.wants/swift-$i@$NAME.service" | ||
829 | 28 | done | ||
830 | 29 | done | ||
831 | 30 | |||
832 | 31 | exit 0 | ||
833 | 32 | |||
834 | diff --git a/debian/swift-container.init b/debian/swift-container.init | |||
835 | 0 | deleted file mode 100644 | 33 | deleted file mode 100644 |
836 | index a320afc..0000000 | |||
837 | --- a/debian/swift-container.init | |||
838 | +++ /dev/null | |||
839 | @@ -1,49 +0,0 @@ | |||
840 | 1 | #! /bin/sh | ||
841 | 2 | ### BEGIN INIT INFO | ||
842 | 3 | # Provides: swift-container | ||
843 | 4 | # Required-Start: $remote_fs | ||
844 | 5 | # Required-Stop: $remote_fs | ||
845 | 6 | # Default-Start: 2 3 4 5 | ||
846 | 7 | # Default-Stop: 0 1 6 | ||
847 | 8 | # Short-Description: Swift container server | ||
848 | 9 | # Description: Container server for swift. | ||
849 | 10 | ### END INIT INFO | ||
850 | 11 | |||
851 | 12 | SERVICE_NAME="container-server" | ||
852 | 13 | PRINT_NAME="Swift container server" | ||
853 | 14 | |||
854 | 15 | . /lib/lsb/init-functions | ||
855 | 16 | |||
856 | 17 | if ! [ -x /usr/bin/swift-init ] ; then | ||
857 | 18 | exit 0 | ||
858 | 19 | fi | ||
859 | 20 | |||
860 | 21 | if ! [ -f "/etc/swift/container-server.conf" ] ; then | ||
861 | 22 | exit 6 | ||
862 | 23 | fi | ||
863 | 24 | |||
864 | 25 | case "$1" in | ||
865 | 26 | start) | ||
866 | 27 | log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
867 | 28 | /usr/bin/swift-init ${SERVICE_NAME} start | ||
868 | 29 | log_end_msg $? | ||
869 | 30 | ;; | ||
870 | 31 | stop) | ||
871 | 32 | log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
872 | 33 | /usr/bin/swift-init ${SERVICE_NAME} stop | ||
873 | 34 | log_end_msg $? | ||
874 | 35 | ;; | ||
875 | 36 | restart|force-reload|reload) | ||
876 | 37 | log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
877 | 38 | /usr/bin/swift-init ${SERVICE_NAME} reload | ||
878 | 39 | ;; | ||
879 | 40 | status) | ||
880 | 41 | exec /usr/bin/swift-init ${SERVICE_NAME} status | ||
881 | 42 | ;; | ||
882 | 43 | *) | ||
883 | 44 | echo "Usage: $0 {start|stop|restart|reload}" | ||
884 | 45 | exit 1 | ||
885 | 46 | ;; | ||
886 | 47 | esac | ||
887 | 48 | |||
888 | 49 | exit 0 | ||
889 | diff --git a/debian/swift-container.install b/debian/swift-container.install | |||
890 | index 96f5112..f70a026 100644 | |||
891 | --- a/debian/swift-container.install | |||
892 | +++ b/debian/swift-container.install | |||
893 | @@ -1,3 +1,6 @@ | |||
894 | 1 | #! /usr/bin/dh-exec --with=install | ||
895 | 2 | debian/swift-container-generator /lib/systemd/system-generators | ||
896 | 3 | |||
897 | 1 | usr/bin/swift-container-* | 4 | usr/bin/swift-container-* |
898 | 2 | usr/bin/swift-manage-shard-ranges | 5 | usr/bin/swift-manage-shard-ranges |
899 | 3 | usr/bin/swift-reconciler-enqueue | 6 | usr/bin/swift-reconciler-enqueue |
900 | diff --git a/debian/swift-container.swift-container-auditor.init b/debian/swift-container.swift-container-auditor.init | |||
901 | 4 | deleted file mode 100644 | 7 | deleted file mode 100644 |
902 | index b81f3fb..0000000 | |||
903 | --- a/debian/swift-container.swift-container-auditor.init | |||
904 | +++ /dev/null | |||
905 | @@ -1,49 +0,0 @@ | |||
906 | 1 | #! /bin/sh | ||
907 | 2 | ### BEGIN INIT INFO | ||
908 | 3 | # Provides: swift-container-auditor | ||
909 | 4 | # Required-Start: $remote_fs | ||
910 | 5 | # Required-Stop: $remote_fs | ||
911 | 6 | # Default-Start: 2 3 4 5 | ||
912 | 7 | # Default-Stop: 0 1 6 | ||
913 | 8 | # Short-Description: Swift container auditor | ||
914 | 9 | # Description: Container auditor for swift. | ||
915 | 10 | ### END INIT INFO | ||
916 | 11 | |||
917 | 12 | SERVICE_NAME="container-auditor" | ||
918 | 13 | PRINT_NAME="Swift container auditor" | ||
919 | 14 | |||
920 | 15 | . /lib/lsb/init-functions | ||
921 | 16 | |||
922 | 17 | if ! [ -x /usr/bin/swift-init ] ; then | ||
923 | 18 | exit 0 | ||
924 | 19 | fi | ||
925 | 20 | |||
926 | 21 | if ! [ -f "/etc/swift/container-server.conf" ] ; then | ||
927 | 22 | exit 6 | ||
928 | 23 | fi | ||
929 | 24 | |||
930 | 25 | case "$1" in | ||
931 | 26 | start) | ||
932 | 27 | log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
933 | 28 | /usr/bin/swift-init ${SERVICE_NAME} start | ||
934 | 29 | log_end_msg $? | ||
935 | 30 | ;; | ||
936 | 31 | stop) | ||
937 | 32 | log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
938 | 33 | /usr/bin/swift-init ${SERVICE_NAME} stop | ||
939 | 34 | log_end_msg $? | ||
940 | 35 | ;; | ||
941 | 36 | restart|force-reload|reload) | ||
942 | 37 | log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
943 | 38 | /usr/bin/swift-init ${SERVICE_NAME} reload | ||
944 | 39 | ;; | ||
945 | 40 | status) | ||
946 | 41 | exec /usr/bin/swift-init ${SERVICE_NAME} status | ||
947 | 42 | ;; | ||
948 | 43 | *) | ||
949 | 44 | echo "Usage: $0 {start|stop|restart|reload}" | ||
950 | 45 | exit 1 | ||
951 | 46 | ;; | ||
952 | 47 | esac | ||
953 | 48 | |||
954 | 49 | exit 0 | ||
955 | diff --git a/debian/swift-container.swift-container-auditor.init.in b/debian/swift-container.swift-container-auditor.init.in | |||
956 | 50 | new file mode 100644 | 0 | new file mode 100644 |
957 | index 0000000..ce7c48f | |||
958 | --- /dev/null | |||
959 | +++ b/debian/swift-container.swift-container-auditor.init.in | |||
960 | @@ -0,0 +1,17 @@ | |||
961 | 1 | #! /bin/sh | ||
962 | 2 | ### BEGIN INIT INFO | ||
963 | 3 | # Provides: swift-container-auditor | ||
964 | 4 | # Required-Start: $remote_fs | ||
965 | 5 | # Required-Stop: $remote_fs | ||
966 | 6 | # Default-Start: 2 3 4 5 | ||
967 | 7 | # Default-Stop: 0 1 6 | ||
968 | 8 | # Short-Description: Swift container auditor | ||
969 | 9 | # Description: Container auditor server for Swift. | ||
970 | 10 | ### END INIT INFO | ||
971 | 11 | |||
972 | 12 | PROJECT_NAME=swift | ||
973 | 13 | NAME="${PROJECT_NAME}-container-auditor" | ||
974 | 14 | DESC="OpenStack Swift container auditor" | ||
975 | 15 | CONFIG=container-server | ||
976 | 16 | MULTI=1 | ||
977 | 17 | SYSTEMD_DOC="man:${NAME}(1)" | ||
978 | diff --git a/debian/swift-container.swift-container-auditor.upstart b/debian/swift-container.swift-container-auditor.upstart | |||
979 | 0 | deleted file mode 100644 | 18 | deleted file mode 100644 |
980 | index 091df78..0000000 | |||
981 | --- a/debian/swift-container.swift-container-auditor.upstart | |||
982 | +++ /dev/null | |||
983 | @@ -1,20 +0,0 @@ | |||
984 | 1 | # swift-container-auditor - SWIFT Container Auditor | ||
985 | 2 | # | ||
986 | 3 | # The swift container auditor. | ||
987 | 4 | |||
988 | 5 | description "SWIFT Container Auditor" | ||
989 | 6 | author "Marc Cluet <marc.cluet@ubuntu.com>" | ||
990 | 7 | |||
991 | 8 | start on runlevel [2345] | ||
992 | 9 | stop on runlevel [016] | ||
993 | 10 | |||
994 | 11 | pre-start script | ||
995 | 12 | if [ -f "/etc/swift/container-server.conf" ]; then | ||
996 | 13 | exec /usr/bin/swift-init container-auditor start | ||
997 | 14 | else | ||
998 | 15 | exit 1 | ||
999 | 16 | fi | ||
1000 | 17 | end script | ||
1001 | 18 | |||
1002 | 19 | post-stop exec /usr/bin/swift-init container-auditor stop | ||
1003 | 20 | |||
1004 | diff --git a/debian/swift-container.swift-container-reconciler.init.in b/debian/swift-container.swift-container-reconciler.init.in | |||
1005 | 21 | new file mode 100644 | 0 | new file mode 100644 |
1006 | index 0000000..d566089 | |||
1007 | --- /dev/null | |||
1008 | +++ b/debian/swift-container.swift-container-reconciler.init.in | |||
1009 | @@ -0,0 +1,16 @@ | |||
1010 | 1 | #! /bin/sh | ||
1011 | 2 | ### BEGIN INIT INFO | ||
1012 | 3 | # Provides: swift-container-reconciler | ||
1013 | 4 | # Required-Start: $remote_fs | ||
1014 | 5 | # Required-Stop: $remote_fs | ||
1015 | 6 | # Default-Start: 2 3 4 5 | ||
1016 | 7 | # Default-Stop: 0 1 6 | ||
1017 | 8 | # Short-Description: Swift container reconciler | ||
1018 | 9 | # Description: Container reconciler for Swift. | ||
1019 | 10 | ### END INIT INFO | ||
1020 | 11 | |||
1021 | 12 | PROJECT_NAME=swift | ||
1022 | 13 | NAME="${PROJECT_NAME}-container-reconciler" | ||
1023 | 14 | DESC="OpenStack Swift container reconciler" | ||
1024 | 15 | CONFIG=container-reconciler | ||
1025 | 16 | SYSTEMD_DOC="man:${NAME}(1)" | ||
1026 | diff --git a/debian/swift-container.swift-container-replicator.init b/debian/swift-container.swift-container-replicator.init | |||
1027 | 0 | deleted file mode 100644 | 17 | deleted file mode 100644 |
1028 | index 5a906e5..0000000 | |||
1029 | --- a/debian/swift-container.swift-container-replicator.init | |||
1030 | +++ /dev/null | |||
1031 | @@ -1,49 +0,0 @@ | |||
1032 | 1 | #! /bin/sh | ||
1033 | 2 | ### BEGIN INIT INFO | ||
1034 | 3 | # Provides: swift-container-replicator | ||
1035 | 4 | # Required-Start: $remote_fs | ||
1036 | 5 | # Required-Stop: $remote_fs | ||
1037 | 6 | # Default-Start: 2 3 4 5 | ||
1038 | 7 | # Default-Stop: 0 1 6 | ||
1039 | 8 | # Short-Description: Swift container replicator | ||
1040 | 9 | # Description: Container replicator for swift. | ||
1041 | 10 | ### END INIT INFO | ||
1042 | 11 | |||
1043 | 12 | SERVICE_NAME="container-replicator" | ||
1044 | 13 | PRINT_NAME="Swift container replicator" | ||
1045 | 14 | |||
1046 | 15 | . /lib/lsb/init-functions | ||
1047 | 16 | |||
1048 | 17 | if ! [ -x /usr/bin/swift-init ] ; then | ||
1049 | 18 | exit 0 | ||
1050 | 19 | fi | ||
1051 | 20 | |||
1052 | 21 | if ! [ -f "/etc/swift/container-server.conf" ] ; then | ||
1053 | 22 | exit 6 | ||
1054 | 23 | fi | ||
1055 | 24 | |||
1056 | 25 | case "$1" in | ||
1057 | 26 | start) | ||
1058 | 27 | log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1059 | 28 | /usr/bin/swift-init ${SERVICE_NAME} start | ||
1060 | 29 | log_end_msg $? | ||
1061 | 30 | ;; | ||
1062 | 31 | stop) | ||
1063 | 32 | log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1064 | 33 | /usr/bin/swift-init ${SERVICE_NAME} stop | ||
1065 | 34 | log_end_msg $? | ||
1066 | 35 | ;; | ||
1067 | 36 | restart|force-reload|reload) | ||
1068 | 37 | log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1069 | 38 | /usr/bin/swift-init ${SERVICE_NAME} reload | ||
1070 | 39 | ;; | ||
1071 | 40 | status) | ||
1072 | 41 | exec /usr/bin/swift-init ${SERVICE_NAME} status | ||
1073 | 42 | ;; | ||
1074 | 43 | *) | ||
1075 | 44 | echo "Usage: $0 {start|stop|restart|reload}" | ||
1076 | 45 | exit 1 | ||
1077 | 46 | ;; | ||
1078 | 47 | esac | ||
1079 | 48 | |||
1080 | 49 | exit 0 | ||
1081 | diff --git a/debian/swift-container.swift-container-replicator.init.in b/debian/swift-container.swift-container-replicator.init.in | |||
1082 | 50 | new file mode 100644 | 0 | new file mode 100644 |
1083 | index 0000000..4b989d5 | |||
1084 | --- /dev/null | |||
1085 | +++ b/debian/swift-container.swift-container-replicator.init.in | |||
1086 | @@ -0,0 +1,17 @@ | |||
1087 | 1 | #! /bin/sh | ||
1088 | 2 | ### BEGIN INIT INFO | ||
1089 | 3 | # Provides: swift-container-replicator | ||
1090 | 4 | # Required-Start: $remote_fs | ||
1091 | 5 | # Required-Stop: $remote_fs | ||
1092 | 6 | # Default-Start: 2 3 4 5 | ||
1093 | 7 | # Default-Stop: 0 1 6 | ||
1094 | 8 | # Short-Description: Swift container replicator | ||
1095 | 9 | # Description: Container replicator for Swift. | ||
1096 | 10 | ### END INIT INFO | ||
1097 | 11 | |||
1098 | 12 | PROJECT_NAME=swift | ||
1099 | 13 | NAME="${PROJECT_NAME}-container-replicator" | ||
1100 | 14 | DESC="OpenStack Swift container replicator" | ||
1101 | 15 | CONFIG=container-server | ||
1102 | 16 | MULTI=1 | ||
1103 | 17 | SYSTEMD_DOC="man:${NAME}(1)" | ||
1104 | diff --git a/debian/swift-container.swift-container-replicator.upstart b/debian/swift-container.swift-container-replicator.upstart | |||
1105 | 0 | deleted file mode 100644 | 18 | deleted file mode 100644 |
1106 | index 0583c94..0000000 | |||
1107 | --- a/debian/swift-container.swift-container-replicator.upstart | |||
1108 | +++ /dev/null | |||
1109 | @@ -1,20 +0,0 @@ | |||
1110 | 1 | # swift-container-replicator - SWIFT Container Replicator | ||
1111 | 2 | # | ||
1112 | 3 | # The swift container replicator. | ||
1113 | 4 | |||
1114 | 5 | description "SWIFT Container Replicator" | ||
1115 | 6 | author "Marc Cluet <marc.cluet@ubuntu.com>" | ||
1116 | 7 | |||
1117 | 8 | start on runlevel [2345] | ||
1118 | 9 | stop on runlevel [016] | ||
1119 | 10 | |||
1120 | 11 | pre-start script | ||
1121 | 12 | if [ -f "/etc/swift/container-server.conf" ]; then | ||
1122 | 13 | exec /usr/bin/swift-init container-replicator start | ||
1123 | 14 | else | ||
1124 | 15 | exit 1 | ||
1125 | 16 | fi | ||
1126 | 17 | end script | ||
1127 | 18 | |||
1128 | 19 | post-stop exec /usr/bin/swift-init container-replicator stop | ||
1129 | 20 | |||
1130 | diff --git a/debian/swift-container.swift-container-sharder.init b/debian/swift-container.swift-container-sharder.init | |||
1131 | 21 | deleted file mode 100644 | 0 | deleted file mode 100644 |
1132 | index 232258f..0000000 | |||
1133 | --- a/debian/swift-container.swift-container-sharder.init | |||
1134 | +++ /dev/null | |||
1135 | @@ -1,49 +0,0 @@ | |||
1136 | 1 | #! /bin/sh | ||
1137 | 2 | ### BEGIN INIT INFO | ||
1138 | 3 | # Provides: swift-container-sharder | ||
1139 | 4 | # Required-Start: $remote_fs | ||
1140 | 5 | # Required-Stop: $remote_fs | ||
1141 | 6 | # Default-Start: 2 3 4 5 | ||
1142 | 7 | # Default-Stop: 0 1 6 | ||
1143 | 8 | # Short-Description: Swift container sharder | ||
1144 | 9 | # Description: Container sharder for swift. | ||
1145 | 10 | ### END INIT INFO | ||
1146 | 11 | |||
1147 | 12 | SERVICE_NAME="container-sharder" | ||
1148 | 13 | PRINT_NAME="Swift container sharder" | ||
1149 | 14 | |||
1150 | 15 | . /lib/lsb/init-functions | ||
1151 | 16 | |||
1152 | 17 | if ! [ -x /usr/bin/swift-init ] ; then | ||
1153 | 18 | exit 0 | ||
1154 | 19 | fi | ||
1155 | 20 | |||
1156 | 21 | if ! [ -f "/etc/swift/container-server.conf" ] ; then | ||
1157 | 22 | exit 6 | ||
1158 | 23 | fi | ||
1159 | 24 | |||
1160 | 25 | case "$1" in | ||
1161 | 26 | start) | ||
1162 | 27 | log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1163 | 28 | /usr/bin/swift-init ${SERVICE_NAME} start | ||
1164 | 29 | log_end_msg $? | ||
1165 | 30 | ;; | ||
1166 | 31 | stop) | ||
1167 | 32 | log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1168 | 33 | /usr/bin/swift-init ${SERVICE_NAME} stop | ||
1169 | 34 | log_end_msg $? | ||
1170 | 35 | ;; | ||
1171 | 36 | restart|force-reload|reload) | ||
1172 | 37 | log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1173 | 38 | /usr/bin/swift-init ${SERVICE_NAME} reload | ||
1174 | 39 | ;; | ||
1175 | 40 | status) | ||
1176 | 41 | exec /usr/bin/swift-init ${SERVICE_NAME} status | ||
1177 | 42 | ;; | ||
1178 | 43 | *) | ||
1179 | 44 | echo "Usage: $0 {start|stop|restart|reload}" | ||
1180 | 45 | exit 1 | ||
1181 | 46 | ;; | ||
1182 | 47 | esac | ||
1183 | 48 | |||
1184 | 49 | exit 0 | ||
1185 | diff --git a/debian/swift-container.swift-container-sharder.init.in b/debian/swift-container.swift-container-sharder.init.in | |||
1186 | 50 | new file mode 100644 | 0 | new file mode 100644 |
1187 | index 0000000..9ea0e04 | |||
1188 | --- /dev/null | |||
1189 | +++ b/debian/swift-container.swift-container-sharder.init.in | |||
1190 | @@ -0,0 +1,17 @@ | |||
1191 | 1 | #! /bin/sh | ||
1192 | 2 | ### BEGIN INIT INFO | ||
1193 | 3 | # Provides: swift-container-sharder | ||
1194 | 4 | # Required-Start: $remote_fs | ||
1195 | 5 | # Required-Stop: $remote_fs | ||
1196 | 6 | # Default-Start: 2 3 4 5 | ||
1197 | 7 | # Default-Stop: 0 1 6 | ||
1198 | 8 | # Short-Description: Swift container sharder | ||
1199 | 9 | # Description: Container sharder for Swift. | ||
1200 | 10 | ### END INIT INFO | ||
1201 | 11 | |||
1202 | 12 | PROJECT_NAME=swift | ||
1203 | 13 | NAME="${PROJECT_NAME}-container-sharder" | ||
1204 | 14 | DESC="OpenStack Swift container sharder" | ||
1205 | 15 | CONFIG=container-server | ||
1206 | 16 | MULTI=1 | ||
1207 | 17 | SYSTEMD_DOC="man:${NAME}(1)" | ||
1208 | diff --git a/debian/swift-container.swift-container-sync.init b/debian/swift-container.swift-container-sync.init | |||
1209 | 0 | deleted file mode 100644 | 18 | deleted file mode 100644 |
1210 | index 098706a..0000000 | |||
1211 | --- a/debian/swift-container.swift-container-sync.init | |||
1212 | +++ /dev/null | |||
1213 | @@ -1,49 +0,0 @@ | |||
1214 | 1 | #! /bin/sh | ||
1215 | 2 | ### BEGIN INIT INFO | ||
1216 | 3 | # Provides: swift-container-sync | ||
1217 | 4 | # Required-Start: $remote_fs | ||
1218 | 5 | # Required-Stop: $remote_fs | ||
1219 | 6 | # Default-Start: 2 3 4 5 | ||
1220 | 7 | # Default-Stop: 0 1 6 | ||
1221 | 8 | # Short-Description: Swift container sync | ||
1222 | 9 | # Description: Container sync for swift. | ||
1223 | 10 | ### END INIT INFO | ||
1224 | 11 | |||
1225 | 12 | SERVICE_NAME="container-sync" | ||
1226 | 13 | PRINT_NAME="Swift container sync" | ||
1227 | 14 | |||
1228 | 15 | . /lib/lsb/init-functions | ||
1229 | 16 | |||
1230 | 17 | if ! [ -x /usr/bin/swift-init ] ; then | ||
1231 | 18 | exit 0 | ||
1232 | 19 | fi | ||
1233 | 20 | |||
1234 | 21 | if ! [ -f "/etc/swift/container-server.conf" ] ; then | ||
1235 | 22 | exit 6 | ||
1236 | 23 | fi | ||
1237 | 24 | |||
1238 | 25 | case "$1" in | ||
1239 | 26 | start) | ||
1240 | 27 | log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1241 | 28 | /usr/bin/swift-init ${SERVICE_NAME} start | ||
1242 | 29 | log_end_msg $? | ||
1243 | 30 | ;; | ||
1244 | 31 | stop) | ||
1245 | 32 | log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1246 | 33 | /usr/bin/swift-init ${SERVICE_NAME} stop | ||
1247 | 34 | log_end_msg $? | ||
1248 | 35 | ;; | ||
1249 | 36 | restart|force-reload|reload) | ||
1250 | 37 | log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1251 | 38 | /usr/bin/swift-init ${SERVICE_NAME} reload | ||
1252 | 39 | ;; | ||
1253 | 40 | status) | ||
1254 | 41 | exec /usr/bin/swift-init ${SERVICE_NAME} status | ||
1255 | 42 | ;; | ||
1256 | 43 | *) | ||
1257 | 44 | echo "Usage: $0 {start|stop|restart|reload}" | ||
1258 | 45 | exit 1 | ||
1259 | 46 | ;; | ||
1260 | 47 | esac | ||
1261 | 48 | |||
1262 | 49 | exit 0 | ||
1263 | diff --git a/debian/swift-container.swift-container-sync.init.in b/debian/swift-container.swift-container-sync.init.in | |||
1264 | 50 | new file mode 100644 | 0 | new file mode 100644 |
1265 | index 0000000..c24e790 | |||
1266 | --- /dev/null | |||
1267 | +++ b/debian/swift-container.swift-container-sync.init.in | |||
1268 | @@ -0,0 +1,17 @@ | |||
1269 | 1 | #! /bin/sh | ||
1270 | 2 | ### BEGIN INIT INFO | ||
1271 | 3 | # Provides: swift-container-sync | ||
1272 | 4 | # Required-Start: $remote_fs | ||
1273 | 5 | # Required-Stop: $remote_fs | ||
1274 | 6 | # Default-Start: 2 3 4 5 | ||
1275 | 7 | # Default-Stop: 0 1 6 | ||
1276 | 8 | # Short-Description: Swift container sync | ||
1277 | 9 | # Description: Container sync server for Swift. | ||
1278 | 10 | ### END INIT INFO | ||
1279 | 11 | |||
1280 | 12 | PROJECT_NAME=swift | ||
1281 | 13 | NAME="${PROJECT_NAME}-container-sync" | ||
1282 | 14 | DESC="OpenStack Swift container sync" | ||
1283 | 15 | CONFIG=container-server | ||
1284 | 16 | MULTI=1 | ||
1285 | 17 | SYSTEMD_DOC="man:${NAME}(1)" | ||
1286 | diff --git a/debian/swift-container.swift-container-sync.upstart b/debian/swift-container.swift-container-sync.upstart | |||
1287 | 0 | deleted file mode 100644 | 18 | deleted file mode 100644 |
1288 | index 6a5c320..0000000 | |||
1289 | --- a/debian/swift-container.swift-container-sync.upstart | |||
1290 | +++ /dev/null | |||
1291 | @@ -1,15 +0,0 @@ | |||
1292 | 1 | description "SWIFT Container Sync" | ||
1293 | 2 | author "James Page <james.page@ubuntu.com>" | ||
1294 | 3 | |||
1295 | 4 | start on runlevel [2345] | ||
1296 | 5 | stop on runlevel [016] | ||
1297 | 6 | |||
1298 | 7 | pre-start script | ||
1299 | 8 | if [ -f "/etc/swift/container-server.conf" ]; then | ||
1300 | 9 | exec /usr/bin/swift-init container-sync start | ||
1301 | 10 | else | ||
1302 | 11 | exit 1 | ||
1303 | 12 | fi | ||
1304 | 13 | end script | ||
1305 | 14 | |||
1306 | 15 | post-stop exec /usr/bin/swift-init container-sync stop | ||
1307 | diff --git a/debian/swift-container.swift-container-updater.init b/debian/swift-container.swift-container-updater.init | |||
1308 | 16 | deleted file mode 100644 | 0 | deleted file mode 100644 |
1309 | index 7082e8f..0000000 | |||
1310 | --- a/debian/swift-container.swift-container-updater.init | |||
1311 | +++ /dev/null | |||
1312 | @@ -1,49 +0,0 @@ | |||
1313 | 1 | #! /bin/sh | ||
1314 | 2 | ### BEGIN INIT INFO | ||
1315 | 3 | # Provides: swift-container-updater | ||
1316 | 4 | # Required-Start: $remote_fs | ||
1317 | 5 | # Required-Stop: $remote_fs | ||
1318 | 6 | # Default-Start: 2 3 4 5 | ||
1319 | 7 | # Default-Stop: 0 1 6 | ||
1320 | 8 | # Short-Description: Swift container updater | ||
1321 | 9 | # Description: Container updater for swift. | ||
1322 | 10 | ### END INIT INFO | ||
1323 | 11 | |||
1324 | 12 | SERVICE_NAME="container-updater" | ||
1325 | 13 | PRINT_NAME="Swift container updater" | ||
1326 | 14 | |||
1327 | 15 | . /lib/lsb/init-functions | ||
1328 | 16 | |||
1329 | 17 | if ! [ -x /usr/bin/swift-init ] ; then | ||
1330 | 18 | exit 0 | ||
1331 | 19 | fi | ||
1332 | 20 | |||
1333 | 21 | if ! [ -f "/etc/swift/container-server.conf" ] ; then | ||
1334 | 22 | exit 6 | ||
1335 | 23 | fi | ||
1336 | 24 | |||
1337 | 25 | case "$1" in | ||
1338 | 26 | start) | ||
1339 | 27 | log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1340 | 28 | /usr/bin/swift-init ${SERVICE_NAME} start | ||
1341 | 29 | log_end_msg $? | ||
1342 | 30 | ;; | ||
1343 | 31 | stop) | ||
1344 | 32 | log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1345 | 33 | /usr/bin/swift-init ${SERVICE_NAME} stop | ||
1346 | 34 | log_end_msg $? | ||
1347 | 35 | ;; | ||
1348 | 36 | restart|force-reload|reload) | ||
1349 | 37 | log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1350 | 38 | /usr/bin/swift-init ${SERVICE_NAME} reload | ||
1351 | 39 | ;; | ||
1352 | 40 | status) | ||
1353 | 41 | exec /usr/bin/swift-init ${SERVICE_NAME} status | ||
1354 | 42 | ;; | ||
1355 | 43 | *) | ||
1356 | 44 | echo "Usage: $0 {start|stop|restart|reload}" | ||
1357 | 45 | exit 1 | ||
1358 | 46 | ;; | ||
1359 | 47 | esac | ||
1360 | 48 | |||
1361 | 49 | exit 0 | ||
1362 | diff --git a/debian/swift-container.swift-container-updater.init.in b/debian/swift-container.swift-container-updater.init.in | |||
1363 | 50 | new file mode 100644 | 0 | new file mode 100644 |
1364 | index 0000000..73c5f36 | |||
1365 | --- /dev/null | |||
1366 | +++ b/debian/swift-container.swift-container-updater.init.in | |||
1367 | @@ -0,0 +1,17 @@ | |||
1368 | 1 | #! /bin/sh | ||
1369 | 2 | ### BEGIN INIT INFO | ||
1370 | 3 | # Provides: swift-container-updater | ||
1371 | 4 | # Required-Start: $remote_fs | ||
1372 | 5 | # Required-Stop: $remote_fs | ||
1373 | 6 | # Default-Start: 2 3 4 5 | ||
1374 | 7 | # Default-Stop: 0 1 6 | ||
1375 | 8 | # Short-Description: Swift container updater | ||
1376 | 9 | # Description: Container updater server for Swift. | ||
1377 | 10 | ### END INIT INFO | ||
1378 | 11 | |||
1379 | 12 | PROJECT_NAME=swift | ||
1380 | 13 | NAME="${PROJECT_NAME}-container-updater" | ||
1381 | 14 | DESC="OpenStack Swift container updater" | ||
1382 | 15 | CONFIG=container-server | ||
1383 | 16 | MULTI=1 | ||
1384 | 17 | SYSTEMD_DOC="man:${NAME}(1)" | ||
1385 | diff --git a/debian/swift-container.swift-container-updater.upstart b/debian/swift-container.swift-container-updater.upstart | |||
1386 | 0 | deleted file mode 100644 | 18 | deleted file mode 100644 |
1387 | index f41895b..0000000 | |||
1388 | --- a/debian/swift-container.swift-container-updater.upstart | |||
1389 | +++ /dev/null | |||
1390 | @@ -1,20 +0,0 @@ | |||
1391 | 1 | # swift-container-updater - SWIFT Container Updater | ||
1392 | 2 | # | ||
1393 | 3 | # The swift container updater. | ||
1394 | 4 | |||
1395 | 5 | description "SWIFT Container Updater" | ||
1396 | 6 | author "Marc Cluet <marc.cluet@ubuntu.com>" | ||
1397 | 7 | |||
1398 | 8 | start on runlevel [2345] | ||
1399 | 9 | stop on runlevel [016] | ||
1400 | 10 | |||
1401 | 11 | pre-start script | ||
1402 | 12 | if [ -f "/etc/swift/container-server.conf" ]; then | ||
1403 | 13 | exec /usr/bin/swift-init container-updater start | ||
1404 | 14 | else | ||
1405 | 15 | exit 1 | ||
1406 | 16 | fi | ||
1407 | 17 | end script | ||
1408 | 18 | |||
1409 | 19 | post-stop exec /usr/bin/swift-init container-updater stop | ||
1410 | 20 | |||
1411 | diff --git a/debian/swift-container.swift-container.init.in b/debian/swift-container.swift-container.init.in | |||
1412 | 21 | new file mode 100644 | 0 | new file mode 100644 |
1413 | index 0000000..a12c3df | |||
1414 | --- /dev/null | |||
1415 | +++ b/debian/swift-container.swift-container.init.in | |||
1416 | @@ -0,0 +1,17 @@ | |||
1417 | 1 | #! /bin/sh | ||
1418 | 2 | ### BEGIN INIT INFO | ||
1419 | 3 | # Provides: swift-container | ||
1420 | 4 | # Required-Start: $remote_fs | ||
1421 | 5 | # Required-Stop: $remote_fs | ||
1422 | 6 | # Default-Start: 2 3 4 5 | ||
1423 | 7 | # Default-Stop: 0 1 6 | ||
1424 | 8 | # Short-Description: Swift container server | ||
1425 | 9 | # Description: Container server for Swift. | ||
1426 | 10 | ### END INIT INFO | ||
1427 | 11 | |||
1428 | 12 | PROJECT_NAME=swift | ||
1429 | 13 | NAME="${PROJECT_NAME}-container-server" | ||
1430 | 14 | DESC="OpenStack Swift container server" | ||
1431 | 15 | CONFIG=container-server | ||
1432 | 16 | MULTI=1 | ||
1433 | 17 | SYSTEMD_DOC="man:${NAME}(1)" | ||
1434 | diff --git a/debian/swift-container.upstart b/debian/swift-container.upstart | |||
1435 | 0 | deleted file mode 100644 | 18 | deleted file mode 100644 |
1436 | index 8035002..0000000 | |||
1437 | --- a/debian/swift-container.upstart | |||
1438 | +++ /dev/null | |||
1439 | @@ -1,20 +0,0 @@ | |||
1440 | 1 | # swift-container-server - SWIFT Container Server | ||
1441 | 2 | # | ||
1442 | 3 | # The swift container server. | ||
1443 | 4 | |||
1444 | 5 | description "SWIFT Container Server" | ||
1445 | 6 | author "Marc Cluet <marc.cluet@ubuntu.com>" | ||
1446 | 7 | |||
1447 | 8 | start on runlevel [2345] | ||
1448 | 9 | stop on runlevel [016] | ||
1449 | 10 | |||
1450 | 11 | pre-start script | ||
1451 | 12 | if [ -f "/etc/swift/container-server.conf" ]; then | ||
1452 | 13 | exec /usr/bin/swift-init container-server start | ||
1453 | 14 | else | ||
1454 | 15 | exit 1 | ||
1455 | 16 | fi | ||
1456 | 17 | end script | ||
1457 | 18 | |||
1458 | 19 | post-stop exec /usr/bin/swift-init container-server stop | ||
1459 | 20 | |||
1460 | diff --git a/debian/swift-object-expirer.init b/debian/swift-object-expirer.init | |||
1461 | 21 | deleted file mode 100644 | 0 | deleted file mode 100644 |
1462 | index 2800190..0000000 | |||
1463 | --- a/debian/swift-object-expirer.init | |||
1464 | +++ /dev/null | |||
1465 | @@ -1,49 +0,0 @@ | |||
1466 | 1 | #! /bin/sh | ||
1467 | 2 | ### BEGIN INIT INFO | ||
1468 | 3 | # Provides: swift-object-expirer | ||
1469 | 4 | # Required-Start: $remote_fs | ||
1470 | 5 | # Required-Stop: $remote_fs | ||
1471 | 6 | # Default-Start: 2 3 4 5 | ||
1472 | 7 | # Default-Stop: 0 1 6 | ||
1473 | 8 | # Short-Description: Swift object expirer | ||
1474 | 9 | # Description: Object expirer for swift. | ||
1475 | 10 | ### END INIT INFO | ||
1476 | 11 | |||
1477 | 12 | SERVICE_NAME="object-expirer" | ||
1478 | 13 | PRINT_NAME="Swift object expirer" | ||
1479 | 14 | |||
1480 | 15 | . /lib/lsb/init-functions | ||
1481 | 16 | |||
1482 | 17 | if ! [ -x /usr/bin/swift-init ] ; then | ||
1483 | 18 | exit 0 | ||
1484 | 19 | fi | ||
1485 | 20 | |||
1486 | 21 | if ! [ -f "/etc/swift/object-expirer.conf" ] ; then | ||
1487 | 22 | exit 6 | ||
1488 | 23 | fi | ||
1489 | 24 | |||
1490 | 25 | case "$1" in | ||
1491 | 26 | start) | ||
1492 | 27 | log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1493 | 28 | /usr/bin/swift-init ${SERVICE_NAME} start | ||
1494 | 29 | log_end_msg $? | ||
1495 | 30 | ;; | ||
1496 | 31 | stop) | ||
1497 | 32 | log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1498 | 33 | /usr/bin/swift-init ${SERVICE_NAME} stop | ||
1499 | 34 | log_end_msg $? | ||
1500 | 35 | ;; | ||
1501 | 36 | restart|force-reload|reload) | ||
1502 | 37 | log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1503 | 38 | /usr/bin/swift-init ${SERVICE_NAME} reload | ||
1504 | 39 | ;; | ||
1505 | 40 | status) | ||
1506 | 41 | exec /usr/bin/swift-init ${SERVICE_NAME} status | ||
1507 | 42 | ;; | ||
1508 | 43 | *) | ||
1509 | 44 | echo "Usage: $0 {start|stop|restart|reload}" | ||
1510 | 45 | exit 1 | ||
1511 | 46 | ;; | ||
1512 | 47 | esac | ||
1513 | 48 | |||
1514 | 49 | exit 0 | ||
1515 | diff --git a/debian/swift-object-expirer.swift-object-expirer.init.in b/debian/swift-object-expirer.swift-object-expirer.init.in | |||
1516 | 50 | new file mode 100644 | 0 | new file mode 100644 |
1517 | index 0000000..ead7164 | |||
1518 | --- /dev/null | |||
1519 | +++ b/debian/swift-object-expirer.swift-object-expirer.init.in | |||
1520 | @@ -0,0 +1,16 @@ | |||
1521 | 1 | #! /bin/sh | ||
1522 | 2 | ### BEGIN INIT INFO | ||
1523 | 3 | # Provides: swift-object-expirer | ||
1524 | 4 | # Required-Start: $remote_fs | ||
1525 | 5 | # Required-Stop: $remote_fs | ||
1526 | 6 | # Default-Start: 2 3 4 5 | ||
1527 | 7 | # Default-Stop: 0 1 6 | ||
1528 | 8 | # Short-Description: Swift object expirer | ||
1529 | 9 | # Description: Object expirer daemon for Swift. | ||
1530 | 10 | ### END INIT INFO | ||
1531 | 11 | |||
1532 | 12 | PROJECT_NAME=swift | ||
1533 | 13 | NAME="${PROJECT_NAME}-object-expirer" | ||
1534 | 14 | DESC="OpenStack Swift object expirer" | ||
1535 | 15 | CONFIG=object-expirer | ||
1536 | 16 | SYSTEMD_DOC="man:${NAME}(1)" | ||
1537 | diff --git a/debian/swift-object-expirer.upstart b/debian/swift-object-expirer.upstart | |||
1538 | 0 | deleted file mode 100644 | 17 | deleted file mode 100644 |
1539 | index 6ac508a..0000000 | |||
1540 | --- a/debian/swift-object-expirer.upstart | |||
1541 | +++ /dev/null | |||
1542 | @@ -1,15 +0,0 @@ | |||
1543 | 1 | description "SWIFT Object Expirer" | ||
1544 | 2 | author "Will Kelly <william.kelly@rackspace.com>" | ||
1545 | 3 | |||
1546 | 4 | start on runlevel [2345] | ||
1547 | 5 | stop on runlevel [016] | ||
1548 | 6 | |||
1549 | 7 | pre-start script | ||
1550 | 8 | if [ -f "/etc/swift/object-expirer.conf" ]; then | ||
1551 | 9 | exec /usr/bin/swift-init object-expirer start | ||
1552 | 10 | else | ||
1553 | 11 | exit 1 | ||
1554 | 12 | fi | ||
1555 | 13 | end script | ||
1556 | 14 | |||
1557 | 15 | post-stop exec /usr/bin/swift-init object-expirer stop | ||
1558 | diff --git a/debian/swift-object-generator b/debian/swift-object-generator | |||
1559 | 16 | new file mode 100755 | 0 | new file mode 100755 |
1560 | index 0000000..91dae09 | |||
1561 | --- /dev/null | |||
1562 | +++ b/debian/swift-object-generator | |||
1563 | @@ -0,0 +1,32 @@ | |||
1564 | 1 | #!/bin/sh | ||
1565 | 2 | |||
1566 | 3 | # This systemd generator creates dependency symlinks that make all | ||
1567 | 4 | # Swift account servers be started/stopped/reloaded | ||
1568 | 5 | # when swift-account*.service is started/stopped/reloaded. | ||
1569 | 6 | |||
1570 | 7 | set -eu | ||
1571 | 8 | |||
1572 | 9 | GENDIR="$1" | ||
1573 | 10 | LIBDIR="/lib/systemd/system" | ||
1574 | 11 | CONFIG=/etc/swift/account-server | ||
1575 | 12 | |||
1576 | 13 | if [ ! -d "$CONFIG" ] ; then | ||
1577 | 14 | # Single config mode | ||
1578 | 15 | exit 0 | ||
1579 | 16 | fi | ||
1580 | 17 | |||
1581 | 18 | for NAME in $CONFIG/* ; do | ||
1582 | 19 | NAME=${NAME#$CONFIG} | ||
1583 | 20 | NAME=${NAME#/} | ||
1584 | 21 | NAME=${NAME%.conf} | ||
1585 | 22 | |||
1586 | 23 | for i in object object-auditor object-reconstructor object-replicator object-updater ; do | ||
1587 | 24 | mkdir -p "$GENDIR/swift-$i.service.wants" | ||
1588 | 25 | ln -s \ | ||
1589 | 26 | "$LIBDIR/swift-$i@.service" \ | ||
1590 | 27 | "$GENDIR/swift-$i.service.wants/swift-$i@$NAME.service" | ||
1591 | 28 | done | ||
1592 | 29 | done | ||
1593 | 30 | |||
1594 | 31 | exit 0 | ||
1595 | 32 | |||
1596 | diff --git a/debian/swift-object.init b/debian/swift-object.init | |||
1597 | 0 | deleted file mode 100644 | 33 | deleted file mode 100644 |
1598 | index 13609a7..0000000 | |||
1599 | --- a/debian/swift-object.init | |||
1600 | +++ /dev/null | |||
1601 | @@ -1,49 +0,0 @@ | |||
1602 | 1 | #! /bin/sh | ||
1603 | 2 | ### BEGIN INIT INFO | ||
1604 | 3 | # Provides: swift-object | ||
1605 | 4 | # Required-Start: $remote_fs | ||
1606 | 5 | # Required-Stop: $remote_fs | ||
1607 | 6 | # Default-Start: 2 3 4 5 | ||
1608 | 7 | # Default-Stop: 0 1 6 | ||
1609 | 8 | # Short-Description: Swift object server | ||
1610 | 9 | # Description: Object server for swift. | ||
1611 | 10 | ### END INIT INFO | ||
1612 | 11 | |||
1613 | 12 | SERVICE_NAME="object-server" | ||
1614 | 13 | PRINT_NAME="Swift object server" | ||
1615 | 14 | |||
1616 | 15 | . /lib/lsb/init-functions | ||
1617 | 16 | |||
1618 | 17 | if ! [ -x /usr/bin/swift-init ] ; then | ||
1619 | 18 | exit 0 | ||
1620 | 19 | fi | ||
1621 | 20 | |||
1622 | 21 | if ! [ -f "/etc/swift/object-server.conf" ] ; then | ||
1623 | 22 | exit 6 | ||
1624 | 23 | fi | ||
1625 | 24 | |||
1626 | 25 | case "$1" in | ||
1627 | 26 | start) | ||
1628 | 27 | log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1629 | 28 | /usr/bin/swift-init ${SERVICE_NAME} start | ||
1630 | 29 | log_end_msg $? | ||
1631 | 30 | ;; | ||
1632 | 31 | stop) | ||
1633 | 32 | log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1634 | 33 | /usr/bin/swift-init ${SERVICE_NAME} stop | ||
1635 | 34 | log_end_msg $? | ||
1636 | 35 | ;; | ||
1637 | 36 | restart|force-reload|reload) | ||
1638 | 37 | log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1639 | 38 | /usr/bin/swift-init ${SERVICE_NAME} reload | ||
1640 | 39 | ;; | ||
1641 | 40 | status) | ||
1642 | 41 | exec /usr/bin/swift-init ${SERVICE_NAME} status | ||
1643 | 42 | ;; | ||
1644 | 43 | *) | ||
1645 | 44 | echo "Usage: $0 {start|stop|restart|reload}" | ||
1646 | 45 | exit 1 | ||
1647 | 46 | ;; | ||
1648 | 47 | esac | ||
1649 | 48 | |||
1650 | 49 | exit 0 | ||
1651 | diff --git a/debian/swift-object.install b/debian/swift-object.install | |||
1652 | index 44a67e0..eff451b 100644 | |||
1653 | --- a/debian/swift-object.install | |||
1654 | +++ b/debian/swift-object.install | |||
1655 | @@ -1,3 +1,6 @@ | |||
1656 | 1 | #! /usr/bin/dh-exec --with=install | ||
1657 | 2 | debian/swift-object-generator /lib/systemd/system-generators | ||
1658 | 3 | |||
1659 | 1 | usr/bin/swift-object-auditor | 4 | usr/bin/swift-object-auditor |
1660 | 2 | usr/bin/swift-object-info | 5 | usr/bin/swift-object-info |
1661 | 3 | usr/bin/swift-object-reconstructor | 6 | usr/bin/swift-object-reconstructor |
1662 | diff --git a/debian/swift-object.swift-object-auditor.init b/debian/swift-object.swift-object-auditor.init | |||
1663 | 4 | deleted file mode 100644 | 7 | deleted file mode 100644 |
1664 | index 0a92df5..0000000 | |||
1665 | --- a/debian/swift-object.swift-object-auditor.init | |||
1666 | +++ /dev/null | |||
1667 | @@ -1,49 +0,0 @@ | |||
1668 | 1 | #! /bin/sh | ||
1669 | 2 | ### BEGIN INIT INFO | ||
1670 | 3 | # Provides: swift-object-auditor | ||
1671 | 4 | # Required-Start: $remote_fs | ||
1672 | 5 | # Required-Stop: $remote_fs | ||
1673 | 6 | # Default-Start: 2 3 4 5 | ||
1674 | 7 | # Default-Stop: 0 1 6 | ||
1675 | 8 | # Short-Description: Swift object auditor | ||
1676 | 9 | # Description: Object auditor for swift. | ||
1677 | 10 | ### END INIT INFO | ||
1678 | 11 | |||
1679 | 12 | SERVICE_NAME="object-auditor" | ||
1680 | 13 | PRINT_NAME="Swift object auditor" | ||
1681 | 14 | |||
1682 | 15 | . /lib/lsb/init-functions | ||
1683 | 16 | |||
1684 | 17 | if ! [ -x /usr/bin/swift-init ] ; then | ||
1685 | 18 | exit 0 | ||
1686 | 19 | fi | ||
1687 | 20 | |||
1688 | 21 | if ! [ -f "/etc/swift/object-server.conf" ] ; then | ||
1689 | 22 | exit 6 | ||
1690 | 23 | fi | ||
1691 | 24 | |||
1692 | 25 | case "$1" in | ||
1693 | 26 | start) | ||
1694 | 27 | log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1695 | 28 | /usr/bin/swift-init ${SERVICE_NAME} start | ||
1696 | 29 | log_end_msg $? | ||
1697 | 30 | ;; | ||
1698 | 31 | stop) | ||
1699 | 32 | log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1700 | 33 | /usr/bin/swift-init ${SERVICE_NAME} stop | ||
1701 | 34 | log_end_msg $? | ||
1702 | 35 | ;; | ||
1703 | 36 | restart|force-reload|reload) | ||
1704 | 37 | log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1705 | 38 | /usr/bin/swift-init ${SERVICE_NAME} reload | ||
1706 | 39 | ;; | ||
1707 | 40 | status) | ||
1708 | 41 | exec /usr/bin/swift-init ${SERVICE_NAME} status | ||
1709 | 42 | ;; | ||
1710 | 43 | *) | ||
1711 | 44 | echo "Usage: $0 {start|stop|restart|reload}" | ||
1712 | 45 | exit 1 | ||
1713 | 46 | ;; | ||
1714 | 47 | esac | ||
1715 | 48 | |||
1716 | 49 | exit 0 | ||
1717 | diff --git a/debian/swift-object.swift-object-auditor.init.in b/debian/swift-object.swift-object-auditor.init.in | |||
1718 | 50 | new file mode 100644 | 0 | new file mode 100644 |
1719 | index 0000000..53b0ce5 | |||
1720 | --- /dev/null | |||
1721 | +++ b/debian/swift-object.swift-object-auditor.init.in | |||
1722 | @@ -0,0 +1,17 @@ | |||
1723 | 1 | #! /bin/sh | ||
1724 | 2 | ### BEGIN INIT INFO | ||
1725 | 3 | # Provides: swift-object-auditor | ||
1726 | 4 | # Required-Start: $remote_fs | ||
1727 | 5 | # Required-Stop: $remote_fs | ||
1728 | 6 | # Default-Start: 2 3 4 5 | ||
1729 | 7 | # Default-Stop: 0 1 6 | ||
1730 | 8 | # Short-Description: Swift object auditor | ||
1731 | 9 | # Description: Object auditor server for Swift. | ||
1732 | 10 | ### END INIT INFO | ||
1733 | 11 | |||
1734 | 12 | PROJECT_NAME=swift | ||
1735 | 13 | NAME="${PROJECT_NAME}-object-auditor" | ||
1736 | 14 | DESC="OpenStack Swift object auditor" | ||
1737 | 15 | CONFIG=object-server | ||
1738 | 16 | MULTI=1 | ||
1739 | 17 | SYSTEMD_DOC="man:${NAME}(1)" | ||
1740 | diff --git a/debian/swift-object.swift-object-auditor.upstart b/debian/swift-object.swift-object-auditor.upstart | |||
1741 | 0 | deleted file mode 100644 | 18 | deleted file mode 100644 |
1742 | index af5b76d..0000000 | |||
1743 | --- a/debian/swift-object.swift-object-auditor.upstart | |||
1744 | +++ /dev/null | |||
1745 | @@ -1,20 +0,0 @@ | |||
1746 | 1 | # swift-object-auditor - SWIFT Object Auditor | ||
1747 | 2 | # | ||
1748 | 3 | # The swift object auditor. | ||
1749 | 4 | |||
1750 | 5 | description "SWIFT Object Auditor" | ||
1751 | 6 | author "Marc Cluet <marc.cluet@ubuntu.com>" | ||
1752 | 7 | |||
1753 | 8 | start on runlevel [2345] | ||
1754 | 9 | stop on runlevel [016] | ||
1755 | 10 | |||
1756 | 11 | pre-start script | ||
1757 | 12 | if [ -f "/etc/swift/object-server.conf" ]; then | ||
1758 | 13 | exec /usr/bin/swift-init object-auditor start | ||
1759 | 14 | else | ||
1760 | 15 | exit 1 | ||
1761 | 16 | fi | ||
1762 | 17 | end script | ||
1763 | 18 | |||
1764 | 19 | post-stop exec /usr/bin/swift-init object-auditor stop | ||
1765 | 20 | |||
1766 | diff --git a/debian/swift-object.swift-object-reconstructor.init b/debian/swift-object.swift-object-reconstructor.init | |||
1767 | 21 | deleted file mode 100644 | 0 | deleted file mode 100644 |
1768 | index 20a1b5e..0000000 | |||
1769 | --- a/debian/swift-object.swift-object-reconstructor.init | |||
1770 | +++ /dev/null | |||
1771 | @@ -1,49 +0,0 @@ | |||
1772 | 1 | #! /bin/sh | ||
1773 | 2 | ### BEGIN INIT INFO | ||
1774 | 3 | # Provides: swift-object-reconstructor | ||
1775 | 4 | # Required-Start: $remote_fs | ||
1776 | 5 | # Required-Stop: $remote_fs | ||
1777 | 6 | # Default-Start: 2 3 4 5 | ||
1778 | 7 | # Default-Stop: 0 1 6 | ||
1779 | 8 | # Short-Description: Swift object reconstructor | ||
1780 | 9 | # Description: Object reconstructor for swift. | ||
1781 | 10 | ### END INIT INFO | ||
1782 | 11 | |||
1783 | 12 | SERVICE_NAME="object-reconstructor" | ||
1784 | 13 | PRINT_NAME="Swift object reconstructor" | ||
1785 | 14 | |||
1786 | 15 | . /lib/lsb/init-functions | ||
1787 | 16 | |||
1788 | 17 | if ! [ -x /usr/bin/swift-init ] ; then | ||
1789 | 18 | exit 0 | ||
1790 | 19 | fi | ||
1791 | 20 | |||
1792 | 21 | if ! [ -f "/etc/swift/object-server.conf" ] ; then | ||
1793 | 22 | exit 6 | ||
1794 | 23 | fi | ||
1795 | 24 | |||
1796 | 25 | case "$1" in | ||
1797 | 26 | start) | ||
1798 | 27 | log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1799 | 28 | /usr/bin/swift-init ${SERVICE_NAME} start | ||
1800 | 29 | log_end_msg $? | ||
1801 | 30 | ;; | ||
1802 | 31 | stop) | ||
1803 | 32 | log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1804 | 33 | /usr/bin/swift-init ${SERVICE_NAME} stop | ||
1805 | 34 | log_end_msg $? | ||
1806 | 35 | ;; | ||
1807 | 36 | restart|force-reload|reload) | ||
1808 | 37 | log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1809 | 38 | /usr/bin/swift-init ${SERVICE_NAME} reload | ||
1810 | 39 | ;; | ||
1811 | 40 | status) | ||
1812 | 41 | exec /usr/bin/swift-init ${SERVICE_NAME} status | ||
1813 | 42 | ;; | ||
1814 | 43 | *) | ||
1815 | 44 | echo "Usage: $0 {start|stop|restart|reload}" | ||
1816 | 45 | exit 1 | ||
1817 | 46 | ;; | ||
1818 | 47 | esac | ||
1819 | 48 | |||
1820 | 49 | exit 0 | ||
1821 | diff --git a/debian/swift-object.swift-object-reconstructor.init.in b/debian/swift-object.swift-object-reconstructor.init.in | |||
1822 | 50 | new file mode 100644 | 0 | new file mode 100644 |
1823 | index 0000000..6324e00 | |||
1824 | --- /dev/null | |||
1825 | +++ b/debian/swift-object.swift-object-reconstructor.init.in | |||
1826 | @@ -0,0 +1,17 @@ | |||
1827 | 1 | #! /bin/sh | ||
1828 | 2 | ### BEGIN INIT INFO | ||
1829 | 3 | # Provides: swift-object-reconstructor | ||
1830 | 4 | # Required-Start: $remote_fs | ||
1831 | 5 | # Required-Stop: $remote_fs | ||
1832 | 6 | # Default-Start: 2 3 4 5 | ||
1833 | 7 | # Default-Stop: 0 1 6 | ||
1834 | 8 | # Short-Description: Swift object reconstructor | ||
1835 | 9 | # Description: Object reconstructor server for Swift. | ||
1836 | 10 | ### END INIT INFO | ||
1837 | 11 | |||
1838 | 12 | PROJECT_NAME=swift | ||
1839 | 13 | NAME="${PROJECT_NAME}-object-reconstructor" | ||
1840 | 14 | DESC="OpenStack Swift object reconstructor" | ||
1841 | 15 | CONFIG=object-server | ||
1842 | 16 | MULTI=1 | ||
1843 | 17 | SYSTEMD_DOC="man:${NAME}(1)" | ||
1844 | diff --git a/debian/swift-object.swift-object-reconstructor.upstart b/debian/swift-object.swift-object-reconstructor.upstart | |||
1845 | 0 | deleted file mode 100644 | 18 | deleted file mode 100644 |
1846 | index 987f8ab..0000000 | |||
1847 | --- a/debian/swift-object.swift-object-reconstructor.upstart | |||
1848 | +++ /dev/null | |||
1849 | @@ -1,20 +0,0 @@ | |||
1850 | 1 | # swift-object-reconstructor - SWIFT Object Reconstuctor | ||
1851 | 2 | # | ||
1852 | 3 | # The swift object reconstructor. | ||
1853 | 4 | |||
1854 | 5 | description "SWIFT Object Reconstuctor" | ||
1855 | 6 | author "Marc Cluet <marc.cluet@ubuntu.com>" | ||
1856 | 7 | |||
1857 | 8 | start on runlevel [2345] | ||
1858 | 9 | stop on runlevel [016] | ||
1859 | 10 | |||
1860 | 11 | pre-start script | ||
1861 | 12 | if [ -f "/etc/swift/object-server.conf" ]; then | ||
1862 | 13 | exec /usr/bin/swift-init object-reconstructor start | ||
1863 | 14 | else | ||
1864 | 15 | exit 1 | ||
1865 | 16 | fi | ||
1866 | 17 | end script | ||
1867 | 18 | |||
1868 | 19 | post-stop exec /usr/bin/swift-init object-reconstructor stop | ||
1869 | 20 | |||
1870 | diff --git a/debian/swift-object.swift-object-replicator.init b/debian/swift-object.swift-object-replicator.init | |||
1871 | 21 | deleted file mode 100644 | 0 | deleted file mode 100644 |
1872 | index ec6fd50..0000000 | |||
1873 | --- a/debian/swift-object.swift-object-replicator.init | |||
1874 | +++ /dev/null | |||
1875 | @@ -1,49 +0,0 @@ | |||
1876 | 1 | #! /bin/sh | ||
1877 | 2 | ### BEGIN INIT INFO | ||
1878 | 3 | # Provides: swift-object-replicator | ||
1879 | 4 | # Required-Start: $remote_fs | ||
1880 | 5 | # Required-Stop: $remote_fs | ||
1881 | 6 | # Default-Start: 2 3 4 5 | ||
1882 | 7 | # Default-Stop: 0 1 6 | ||
1883 | 8 | # Short-Description: Swift object replicator | ||
1884 | 9 | # Description: Object replicator for swift. | ||
1885 | 10 | ### END INIT INFO | ||
1886 | 11 | |||
1887 | 12 | SERVICE_NAME="object-replicator" | ||
1888 | 13 | PRINT_NAME="Swift object replicator" | ||
1889 | 14 | |||
1890 | 15 | . /lib/lsb/init-functions | ||
1891 | 16 | |||
1892 | 17 | if ! [ -x /usr/bin/swift-init ] ; then | ||
1893 | 18 | exit 0 | ||
1894 | 19 | fi | ||
1895 | 20 | |||
1896 | 21 | if ! [ -f "/etc/swift/object-server.conf" ] ; then | ||
1897 | 22 | exit 6 | ||
1898 | 23 | fi | ||
1899 | 24 | |||
1900 | 25 | case "$1" in | ||
1901 | 26 | start) | ||
1902 | 27 | log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1903 | 28 | /usr/bin/swift-init ${SERVICE_NAME} start | ||
1904 | 29 | log_end_msg $? | ||
1905 | 30 | ;; | ||
1906 | 31 | stop) | ||
1907 | 32 | log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1908 | 33 | /usr/bin/swift-init ${SERVICE_NAME} stop | ||
1909 | 34 | log_end_msg $? | ||
1910 | 35 | ;; | ||
1911 | 36 | restart|force-reload|reload) | ||
1912 | 37 | log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
1913 | 38 | /usr/bin/swift-init ${SERVICE_NAME} reload | ||
1914 | 39 | ;; | ||
1915 | 40 | status) | ||
1916 | 41 | exec /usr/bin/swift-init ${SERVICE_NAME} status | ||
1917 | 42 | ;; | ||
1918 | 43 | *) | ||
1919 | 44 | echo "Usage: $0 {start|stop|restart|reload}" | ||
1920 | 45 | exit 1 | ||
1921 | 46 | ;; | ||
1922 | 47 | esac | ||
1923 | 48 | |||
1924 | 49 | exit 0 | ||
1925 | diff --git a/debian/swift-object.swift-object-replicator.init.in b/debian/swift-object.swift-object-replicator.init.in | |||
1926 | 50 | new file mode 100644 | 0 | new file mode 100644 |
1927 | index 0000000..22f48f9 | |||
1928 | --- /dev/null | |||
1929 | +++ b/debian/swift-object.swift-object-replicator.init.in | |||
1930 | @@ -0,0 +1,17 @@ | |||
1931 | 1 | #! /bin/sh | ||
1932 | 2 | ### BEGIN INIT INFO | ||
1933 | 3 | # Provides: swift-object-replicator | ||
1934 | 4 | # Required-Start: $remote_fs | ||
1935 | 5 | # Required-Stop: $remote_fs | ||
1936 | 6 | # Default-Start: 2 3 4 5 | ||
1937 | 7 | # Default-Stop: 0 1 6 | ||
1938 | 8 | # Short-Description: Swift object replicator | ||
1939 | 9 | # Description: Object replicator server for Swift. | ||
1940 | 10 | ### END INIT INFO | ||
1941 | 11 | |||
1942 | 12 | PROJECT_NAME=swift | ||
1943 | 13 | NAME="${PROJECT_NAME}-object-replicator" | ||
1944 | 14 | DESC="OpenStack Swift object replicator" | ||
1945 | 15 | CONFIG=object-server | ||
1946 | 16 | MULTI=1 | ||
1947 | 17 | SYSTEMD_DOC="man:${NAME}(1)" | ||
1948 | diff --git a/debian/swift-object.swift-object-replicator.upstart b/debian/swift-object.swift-object-replicator.upstart | |||
1949 | 0 | deleted file mode 100644 | 18 | deleted file mode 100644 |
1950 | index 6666e0d..0000000 | |||
1951 | --- a/debian/swift-object.swift-object-replicator.upstart | |||
1952 | +++ /dev/null | |||
1953 | @@ -1,20 +0,0 @@ | |||
1954 | 1 | # swift-object-replicator - SWIFT Object Replicator | ||
1955 | 2 | # | ||
1956 | 3 | # The swift object replicator. | ||
1957 | 4 | |||
1958 | 5 | description "SWIFT Object Replicator" | ||
1959 | 6 | author "Marc Cluet <marc.cluet@ubuntu.com>" | ||
1960 | 7 | |||
1961 | 8 | start on runlevel [2345] | ||
1962 | 9 | stop on runlevel [016] | ||
1963 | 10 | |||
1964 | 11 | pre-start script | ||
1965 | 12 | if [ -f "/etc/swift/object-server.conf" ]; then | ||
1966 | 13 | exec /usr/bin/swift-init object-replicator start | ||
1967 | 14 | else | ||
1968 | 15 | exit 1 | ||
1969 | 16 | fi | ||
1970 | 17 | end script | ||
1971 | 18 | |||
1972 | 19 | post-stop exec /usr/bin/swift-init object-replicator stop | ||
1973 | 20 | |||
1974 | diff --git a/debian/swift-object.swift-object-updater.init b/debian/swift-object.swift-object-updater.init | |||
1975 | 21 | deleted file mode 100644 | 0 | deleted file mode 100644 |
1976 | index 8430640..0000000 | |||
1977 | --- a/debian/swift-object.swift-object-updater.init | |||
1978 | +++ /dev/null | |||
1979 | @@ -1,49 +0,0 @@ | |||
1980 | 1 | #! /bin/sh | ||
1981 | 2 | ### BEGIN INIT INFO | ||
1982 | 3 | # Provides: swift-object-updater | ||
1983 | 4 | # Required-Start: $remote_fs | ||
1984 | 5 | # Required-Stop: $remote_fs | ||
1985 | 6 | # Default-Start: 2 3 4 5 | ||
1986 | 7 | # Default-Stop: 0 1 6 | ||
1987 | 8 | # Short-Description: Swift object updater | ||
1988 | 9 | # Description: Object updater for swift. | ||
1989 | 10 | ### END INIT INFO | ||
1990 | 11 | |||
1991 | 12 | SERVICE_NAME="object-updater" | ||
1992 | 13 | PRINT_NAME="Swift object updater" | ||
1993 | 14 | |||
1994 | 15 | . /lib/lsb/init-functions | ||
1995 | 16 | |||
1996 | 17 | if ! [ -x /usr/bin/swift-init ] ; then | ||
1997 | 18 | exit 0 | ||
1998 | 19 | fi | ||
1999 | 20 | |||
2000 | 21 | if ! [ -f "/etc/swift/object-server.conf" ] ; then | ||
2001 | 22 | exit 6 | ||
2002 | 23 | fi | ||
2003 | 24 | |||
2004 | 25 | case "$1" in | ||
2005 | 26 | start) | ||
2006 | 27 | log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
2007 | 28 | /usr/bin/swift-init ${SERVICE_NAME} start | ||
2008 | 29 | log_end_msg $? | ||
2009 | 30 | ;; | ||
2010 | 31 | stop) | ||
2011 | 32 | log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
2012 | 33 | /usr/bin/swift-init ${SERVICE_NAME} stop | ||
2013 | 34 | log_end_msg $? | ||
2014 | 35 | ;; | ||
2015 | 36 | restart|force-reload|reload) | ||
2016 | 37 | log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
2017 | 38 | /usr/bin/swift-init ${SERVICE_NAME} reload | ||
2018 | 39 | ;; | ||
2019 | 40 | status) | ||
2020 | 41 | exec /usr/bin/swift-init ${SERVICE_NAME} status | ||
2021 | 42 | ;; | ||
2022 | 43 | *) | ||
2023 | 44 | echo "Usage: $0 {start|stop|restart|reload}" | ||
2024 | 45 | exit 1 | ||
2025 | 46 | ;; | ||
2026 | 47 | esac | ||
2027 | 48 | |||
2028 | 49 | exit 0 | ||
2029 | diff --git a/debian/swift-object.swift-object-updater.init.in b/debian/swift-object.swift-object-updater.init.in | |||
2030 | 50 | new file mode 100644 | 0 | new file mode 100644 |
2031 | index 0000000..651f3a5 | |||
2032 | --- /dev/null | |||
2033 | +++ b/debian/swift-object.swift-object-updater.init.in | |||
2034 | @@ -0,0 +1,17 @@ | |||
2035 | 1 | #! /bin/sh | ||
2036 | 2 | ### BEGIN INIT INFO | ||
2037 | 3 | # Provides: swift-object-updater | ||
2038 | 4 | # Required-Start: $remote_fs | ||
2039 | 5 | # Required-Stop: $remote_fs | ||
2040 | 6 | # Default-Start: 2 3 4 5 | ||
2041 | 7 | # Default-Stop: 0 1 6 | ||
2042 | 8 | # Short-Description: Swift object updater | ||
2043 | 9 | # Description: Object updater server for Swift. | ||
2044 | 10 | ### END INIT INFO | ||
2045 | 11 | |||
2046 | 12 | PROJECT_NAME=swift | ||
2047 | 13 | NAME="${PROJECT_NAME}-object-updater" | ||
2048 | 14 | DESC="OpenStack Swift object updater" | ||
2049 | 15 | CONFIG=object-server | ||
2050 | 16 | MULTI=1 | ||
2051 | 17 | SYSTEMD_DOC="man:${NAME}(1)" | ||
2052 | diff --git a/debian/swift-object.swift-object-updater.upstart b/debian/swift-object.swift-object-updater.upstart | |||
2053 | 0 | deleted file mode 100644 | 18 | deleted file mode 100644 |
2054 | index 3c028bf..0000000 | |||
2055 | --- a/debian/swift-object.swift-object-updater.upstart | |||
2056 | +++ /dev/null | |||
2057 | @@ -1,20 +0,0 @@ | |||
2058 | 1 | # swift-object-updater - SWIFT Object Updater | ||
2059 | 2 | # | ||
2060 | 3 | # The swift object updater. | ||
2061 | 4 | |||
2062 | 5 | description "SWIFT Object Updater" | ||
2063 | 6 | author "Marc Cluet <marc.cluet@ubuntu.com>" | ||
2064 | 7 | |||
2065 | 8 | start on runlevel [2345] | ||
2066 | 9 | stop on runlevel [016] | ||
2067 | 10 | |||
2068 | 11 | pre-start script | ||
2069 | 12 | if [ -f "/etc/swift/object-server.conf" ]; then | ||
2070 | 13 | exec /usr/bin/swift-init object-updater start | ||
2071 | 14 | else | ||
2072 | 15 | exit 1 | ||
2073 | 16 | fi | ||
2074 | 17 | end script | ||
2075 | 18 | |||
2076 | 19 | post-stop exec /usr/bin/swift-init object-updater stop | ||
2077 | 20 | |||
2078 | diff --git a/debian/swift-object.swift-object.init.in b/debian/swift-object.swift-object.init.in | |||
2079 | 21 | new file mode 100644 | 0 | new file mode 100644 |
2080 | index 0000000..047ac51 | |||
2081 | --- /dev/null | |||
2082 | +++ b/debian/swift-object.swift-object.init.in | |||
2083 | @@ -0,0 +1,17 @@ | |||
2084 | 1 | #! /bin/sh | ||
2085 | 2 | ### BEGIN INIT INFO | ||
2086 | 3 | # Provides: swift-object | ||
2087 | 4 | # Required-Start: $remote_fs | ||
2088 | 5 | # Required-Stop: $remote_fs | ||
2089 | 6 | # Default-Start: 2 3 4 5 | ||
2090 | 7 | # Default-Stop: 0 1 6 | ||
2091 | 8 | # Short-Description: Swift object server | ||
2092 | 9 | # Description: Object server for Swift. | ||
2093 | 10 | ### END INIT INFO | ||
2094 | 11 | |||
2095 | 12 | PROJECT_NAME=swift | ||
2096 | 13 | NAME="${PROJECT_NAME}-object-server" | ||
2097 | 14 | DESC="OpenStack Swift object server" | ||
2098 | 15 | CONFIG=object-server | ||
2099 | 16 | MULTI=1 | ||
2100 | 17 | SYSTEMD_DOC="man:${NAME}(1)" | ||
2101 | diff --git a/debian/swift-object.upstart b/debian/swift-object.upstart | |||
2102 | 0 | deleted file mode 100644 | 18 | deleted file mode 100644 |
2103 | index 3ef4324..0000000 | |||
2104 | --- a/debian/swift-object.upstart | |||
2105 | +++ /dev/null | |||
2106 | @@ -1,20 +0,0 @@ | |||
2107 | 1 | # swift-object-server - SWIFT Object Server | ||
2108 | 2 | # | ||
2109 | 3 | # The swift object server. | ||
2110 | 4 | |||
2111 | 5 | description "SWIFT Object Server" | ||
2112 | 6 | author "Marc Cluet <marc.cluet@ubuntu.com>" | ||
2113 | 7 | |||
2114 | 8 | start on runlevel [2345] | ||
2115 | 9 | stop on runlevel [016] | ||
2116 | 10 | |||
2117 | 11 | pre-start script | ||
2118 | 12 | if [ -f "/etc/swift/object-server.conf" ]; then | ||
2119 | 13 | exec /usr/bin/swift-init object-server start | ||
2120 | 14 | else | ||
2121 | 15 | exit 1 | ||
2122 | 16 | fi | ||
2123 | 17 | end script | ||
2124 | 18 | |||
2125 | 19 | post-stop exec /usr/bin/swift-init object-server stop | ||
2126 | 20 | |||
2127 | diff --git a/debian/swift-proxy.init b/debian/swift-proxy.init | |||
2128 | 21 | deleted file mode 100644 | 0 | deleted file mode 100644 |
2129 | index 7a2193a..0000000 | |||
2130 | --- a/debian/swift-proxy.init | |||
2131 | +++ /dev/null | |||
2132 | @@ -1,49 +0,0 @@ | |||
2133 | 1 | #! /bin/sh | ||
2134 | 2 | ### BEGIN INIT INFO | ||
2135 | 3 | # Provides: swift-proxy | ||
2136 | 4 | # Required-Start: $remote_fs | ||
2137 | 5 | # Required-Stop: $remote_fs | ||
2138 | 6 | # Default-Start: 2 3 4 5 | ||
2139 | 7 | # Default-Stop: 0 1 6 | ||
2140 | 8 | # Short-Description: Swift proxy server | ||
2141 | 9 | # Description: Proxy server for swift. | ||
2142 | 10 | ### END INIT INFO | ||
2143 | 11 | |||
2144 | 12 | SERVICE_NAME="proxy-server" | ||
2145 | 13 | PRINT_NAME="Swift proxy server" | ||
2146 | 14 | |||
2147 | 15 | . /lib/lsb/init-functions | ||
2148 | 16 | |||
2149 | 17 | if ! [ -x /usr/bin/swift-init ] ; then | ||
2150 | 18 | exit 0 | ||
2151 | 19 | fi | ||
2152 | 20 | |||
2153 | 21 | if ! [ -f "/etc/swift/proxy-server.conf" ] ; then | ||
2154 | 22 | exit 6 | ||
2155 | 23 | fi | ||
2156 | 24 | |||
2157 | 25 | case "$1" in | ||
2158 | 26 | start) | ||
2159 | 27 | log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
2160 | 28 | /usr/bin/swift-init ${SERVICE_NAME} start | ||
2161 | 29 | log_end_msg $? | ||
2162 | 30 | ;; | ||
2163 | 31 | stop) | ||
2164 | 32 | log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
2165 | 33 | /usr/bin/swift-init ${SERVICE_NAME} stop | ||
2166 | 34 | log_end_msg $? | ||
2167 | 35 | ;; | ||
2168 | 36 | restart|force-reload|reload) | ||
2169 | 37 | log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}" | ||
2170 | 38 | /usr/bin/swift-init ${SERVICE_NAME} reload | ||
2171 | 39 | ;; | ||
2172 | 40 | status) | ||
2173 | 41 | exec /usr/bin/swift-init ${SERVICE_NAME} status | ||
2174 | 42 | ;; | ||
2175 | 43 | *) | ||
2176 | 44 | echo "Usage: $0 {start|stop|restart|reload}" | ||
2177 | 45 | exit 1 | ||
2178 | 46 | ;; | ||
2179 | 47 | esac | ||
2180 | 48 | |||
2181 | 49 | exit 0 | ||
2182 | diff --git a/debian/swift-proxy.swift-proxy.init.in b/debian/swift-proxy.swift-proxy.init.in | |||
2183 | 50 | new file mode 100644 | 0 | new file mode 100644 |
2184 | index 0000000..1ae17ac | |||
2185 | --- /dev/null | |||
2186 | +++ b/debian/swift-proxy.swift-proxy.init.in | |||
2187 | @@ -0,0 +1,17 @@ | |||
2188 | 1 | #! /bin/sh | ||
2189 | 2 | ### BEGIN INIT INFO | ||
2190 | 3 | # Provides: swift-proxy | ||
2191 | 4 | # Required-Start: $remote_fs | ||
2192 | 5 | # Required-Stop: $remote_fs | ||
2193 | 6 | # Default-Start: 2 3 4 5 | ||
2194 | 7 | # Default-Stop: 0 1 6 | ||
2195 | 8 | # Short-Description: Swift proxy server | ||
2196 | 9 | # Description: Proxy server for Swift. | ||
2197 | 10 | ### END INIT INFO | ||
2198 | 11 | |||
2199 | 12 | PROJECT_NAME=swift | ||
2200 | 13 | NAME="${PROJECT_NAME}-proxy-server" | ||
2201 | 14 | DESC="OpenStack Swift proxy server" | ||
2202 | 15 | CONFIG=proxy-server | ||
2203 | 16 | MULTI=1 | ||
2204 | 17 | SYSTEMD_DOC="man:${NAME}(1)" | ||
2205 | diff --git a/debian/swift-proxy.upstart b/debian/swift-proxy.upstart | |||
2206 | 0 | deleted file mode 100644 | 18 | deleted file mode 100644 |
2207 | index 8947c51..0000000 | |||
2208 | --- a/debian/swift-proxy.upstart | |||
2209 | +++ /dev/null | |||
2210 | @@ -1,20 +0,0 @@ | |||
2211 | 1 | # swift-proxy - SWIFT Proxy Server | ||
2212 | 2 | # | ||
2213 | 3 | # The swift proxy server. | ||
2214 | 4 | |||
2215 | 5 | description "SWIFT Proxy Server" | ||
2216 | 6 | author "Marc Cluet <marc.cluet@ubuntu.com>" | ||
2217 | 7 | |||
2218 | 8 | start on runlevel [2345] | ||
2219 | 9 | stop on runlevel [016] | ||
2220 | 10 | |||
2221 | 11 | pre-start script | ||
2222 | 12 | if [ -f "/etc/swift/proxy-server.conf" ]; then | ||
2223 | 13 | exec /usr/bin/swift-init proxy-server start | ||
2224 | 14 | else | ||
2225 | 15 | exit 1 | ||
2226 | 16 | fi | ||
2227 | 17 | end script | ||
2228 | 18 | |||
2229 | 19 | post-stop exec /usr/bin/swift-init proxy-server stop | ||
2230 | 20 |
Please can you also reference bug 1827340 in the changelog.