Merge ~chris.macnaughton/ubuntu/+source/swift:master into ~ubuntu-server-dev/ubuntu/+source/swift: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)
Reviewer Review Type Date Requested Status
James Page Approve
Review via email: mp+385815@code.launchpad.net
To post a comment you must log in.
Revision history for this message
James Page (james-page) wrote :

Please can you also reference bug 1827340 in the changelog.

review: Needs Fixing
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
diff --git a/debian/changelog b/debian/changelog
index 5753e39..611ff90 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
1swift (2.25.0-0ubuntu2) UNRELEASED; urgency=medium
2
3 * Update to use Systemd unit files (LP: #1827340, LP: #1800676)
4 * d/*.init.in: Import init script (systemd) generation from Debian.
5 * d/*.upstart: Removed.
6 * d/*.init: Removed
7 * d/*.generator: Import from Debian.
8 * d/*.install: Added reference to generator files
9 * d/gen-init: Import from Debian. Remove WorkingDirectory.
10
11 -- Chris MacNaughton <chris.macnaughton@canonical.com> Thu, 11 Jun 2020 09:43:34 +0000
12
1swift (2.25.0-0ubuntu1) groovy; urgency=medium13swift (2.25.0-0ubuntu1) groovy; urgency=medium
214
3 * New upstream release for OpenStack Ussuri (LP: #1877642).15 * New upstream release for OpenStack Ussuri (LP: #1877642).
diff --git a/debian/gen-init b/debian/gen-init
4new file mode 10075516new file mode 100755
index 0000000..5583fbf
--- /dev/null
+++ b/debian/gen-init
@@ -0,0 +1,93 @@
1#!/bin/sh
2
3INIT_TEMPLATE=${1}
4
5# Get the variables defined in the init template
6. ${INIT_TEMPLATE}
7
8SYSTEM_USER=${PROJECT_NAME}
9SYSTEM_GROUP=${PROJECT_NAME}
10
11# Find out what should go in After=
12SHOULD_START=`cat ${INIT_TEMPLATE} | grep "# Should-Start:" | sed 's/# Should-Start://'`
13
14INIT_FILE=`echo ${INIT_TEMPLATE} | sed 's/.init.in/.init/'`
15SERVICE_FILE=`echo ${INIT_TEMPLATE} | sed 's/.init.in/.service/'`
16
17if [ -n "${SHOULD_START}" ] ; then
18 AFTER="After="
19 for i in ${SHOULD_START} ; do
20 AFTER="${AFTER}${i}.service "
21 done
22fi
23
24if [ -n "$SYSTEMD_DOC" ] ; then
25 SYSTEMD_DOC="Documentation=$SYSTEMD_DOC"
26fi
27
28########
29# init #
30########
31cp "$INIT_TEMPLATE" "$INIT_FILE"
32cat debian/init-script-template >>"$INIT_FILE"
33
34###########
35# systemd #
36###########
37echo "[Unit]
38Description=${DESC}
39ConditionFileNotEmpty=/etc/${PROJECT_NAME}/${CONFIG}.conf
40AssertFileNotEmpty=/etc/swift/account.ring.gz
41AssertFileNotEmpty=/etc/swift/container.ring.gz
42AssertPathExistsGlob=/etc/swift/object*.ring.gz
43$SYSTEMD_DOC
44$AFTER
45
46[Service]
47User=${SYSTEM_USER}
48Group=${SYSTEM_GROUP}
49CacheDirectory=${PROJECT_NAME}
50RuntimeDirectory=${PROJECT_NAME} lock/${PROJECT_NAME}
51ExecStart=/usr/bin/${NAME} /etc/${PROJECT_NAME}/${CONFIG}.conf
52Restart=on-failure
53LimitNOFILE=65535
54
55[Install]
56WantedBy=multi-user.target
57" >${SERVICE_FILE}
58
59##############################
60
61if [ "$MULTI" ] ; then
62
63SERVICE_FILE=`echo ${INIT_TEMPLATE} | sed 's/.init.in/@.service/'`
64SERVICE_NAME=${INIT_TEMPLATE%.init.in}
65SERVICE_NAME=${SERVICE_NAME##*/}
66SERVICE_NAME=${SERVICE_NAME##*.}
67
68echo "[Unit]
69Description=${DESC}
70PartOf=${SERVICE_NAME}.service
71ReloadPropagatedFrom=${SERVICE_NAME}.service
72ConditionFileNotEmpty=/etc/${PROJECT_NAME}/${CONFIG}/%i.conf
73AssertFileNotEmpty=/etc/swift/account.ring.gz
74AssertFileNotEmpty=/etc/swift/container.ring.gz
75AssertPathExistsGlob=/etc/swift/object*.ring.gz
76$SYSTEMD_DOC
77$AFTER
78
79[Service]
80User=${SYSTEM_USER}
81Group=${SYSTEM_GROUP}
82WorkingDirectory=~
83CacheDirectory=${PROJECT_NAME}
84RuntimeDirectory=${PROJECT_NAME} lock/${PROJECT_NAME}
85ExecStart=/usr/bin/${NAME} /etc/${PROJECT_NAME}/${CONFIG}/%i.conf
86Restart=on-failure
87LimitNOFILE=65535
88
89[Install]
90WantedBy=multi-user.target
91" >${SERVICE_FILE}
92
93fi
diff --git a/debian/init-script-template b/debian/init-script-template
0new file mode 10064494new file mode 100644
index 0000000..f94491b
--- /dev/null
+++ b/debian/init-script-template
@@ -0,0 +1,148 @@
1#!/bin/sh
2# The content after this line comes from Debian Swift source package
3# and has been automatically added to a .init.in script, which
4# contains only the descriptive part for the daemon. Everything
5# else is standardized as a single unique script.
6
7# Author: Thomas Goirand <zigo@debian.org>
8# Author: Ondřej Nový <novy@ondrej.org>
9
10# PATH should only include /usr/* if it runs after the mountnfs.sh script
11PATH=/sbin:/usr/sbin:/bin:/usr/bin
12
13DAEMON=/usr/bin/${NAME}
14SYSTEM_USER=${PROJECT_NAME}
15SYSTEM_GROUP=${PROJECT_NAME}
16
17# Exit if the package is not installed
18[ -x $DAEMON ] || exit 0
19
20# If ran as root, create /var/lock/X, /var/run/X and /var/cache/X as needed
21if [ `whoami` = "root" ] ; then
22 for i in lock run cache ; do
23 mkdir -p /var/$i/${PROJECT_NAME}
24 chown ${SYSTEM_USER}:${SYSTEM_GROUP} /var/$i/${PROJECT_NAME}
25 done
26fi
27
28# This defines init_is_upstart which we use later on (+ more...)
29. /lib/lsb/init-functions
30
31RET=0
32
33# Configs
34[ -r /etc/default/openstack ] && . /etc/default/openstack
35[ -r /etc/default/$NAME ] && . /etc/default/$NAME
36
37do_start() {
38 # Check for existence of ring files
39 if
40 [ ! -r /etc/swift/account.ring.gz ] ||
41 [ ! -r /etc/swift/container.ring.gz ] ||
42 test -z "$(find /etc/swift -maxdepth 1 -name 'object*.ring.gz' -print -quit)" ; then
43 log_end_msg 1
44 exit $?
45 fi
46
47 STARTED=
48 for CONF_FILE in /etc/swift/${CONFIG}.conf /etc/swift/${CONFIG}/*.conf ; do
49 if [ ! -e "$CONF_FILE" ] ; then
50 continue
51 fi
52
53 SUFFIX=${CONF_FILE#/etc/swift/$CONFIG}
54 SUFFIX=${SUFFIX%.conf}
55 if [ "$SUFFIX" ] ; then
56 # /etc/swift/${NAME}/*.conf
57 SUFFIX=-${SUFFIX#/}
58 fi
59 PIDFILE=/var/run/${PROJECT_NAME}/${NAME}${SUFFIX}.pid
60
61 start-stop-daemon \
62 --start \
63 --quiet \
64 --background \
65 --chuid ${SYSTEM_USER}:${SYSTEM_GROUP} \
66 --make-pidfile \
67 --pidfile ${PIDFILE} \
68 --chdir /var/lib/${PROJECT_NAME} \
69 --startas $DAEMON \
70 --test > /dev/null \
71 || return 1
72 start-stop-daemon \
73 --start \
74 --quiet \
75 --background \
76 --chuid ${SYSTEM_USER}:${SYSTEM_GROUP} \
77 --make-pidfile \
78 --pidfile ${PIDFILE} \
79 --chdir /var/lib/${PROJECT_NAME} \
80 --startas $DAEMON \
81 -- $CONF_FILE \
82 || return 2
83
84 STARTED=1
85 done
86
87 if [ ! "$STARTED" ] ; then
88 return 2
89 fi
90}
91
92do_stop() {
93 for PIDFILE in /var/run/${PROJECT_NAME}/${NAME}*.pid ; do
94 start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
95 RETVAL=$?
96 rm -f $PIDFILE
97 if [ "$RETVAL" != "0" ] ; then
98 return "$RETVAL"
99 fi
100 done
101}
102
103case "$1" in
104start)
105 #init_is_upstart > /dev/null 2>&1 && exit 1
106 log_daemon_msg "Starting $DESC" "$NAME"
107 do_start
108 case $? in
109 0|1) log_end_msg 0 ; RET=$? ;;
110 2) log_end_msg 1 ; RET=$? ;;
111 esac
112;;
113stop)
114 #init_is_upstart > /dev/null 2>&1 && exit 0
115 log_daemon_msg "Stopping $DESC" "$NAME"
116 do_stop
117 case $? in
118 0|1) log_end_msg 0 ; RET=$? ;;
119 2) log_end_msg 1 ; RET=$? ;;
120 esac
121;;
122status)
123 status_of_proc "$DAEMON" "$NAME"
124 RET=$?
125;;
126restart|force-reload)
127 #init_is_upstart > /dev/null 2>&1 && exit 1
128 log_daemon_msg "Restarting $DESC" "$NAME"
129 do_stop
130 case $? in
131 0|1)
132 do_start
133 case $? in
134 0) log_end_msg 0 ; RET=$? ;;
135 1) log_end_msg 1 ; RET=$? ;; # Old process is still running
136 *) log_end_msg 1 ; RET=$? ;; # Failed to start
137 esac
138 ;;
139 *) log_end_msg 1 ; RET=$? ;; # Failed to stop
140 esac
141;;
142*)
143 echo "Usage: $0 {start|stop|status|restart|force-reload}" >&2
144 RET=3
145;;
146esac
147
148exit $RET
diff --git a/debian/rules b/debian/rules
index 407b4ef..611dbb1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -34,11 +34,18 @@ endif
34get-orig-source:34get-orig-source:
35 uscan --verbose --force-download --rename --destdir=../build-area35 uscan --verbose --force-download --rename --destdir=../build-area
3636
37override_dh_auto_build:
38 dh_auto_build
39 set -e ; set -x ; \
40 for i in $(sort $(wildcard debian/*.init.in)) ; do \
41 debian/gen-init $$i ; \
42 done
43
37override_dh_auto_install:44override_dh_auto_install:
38 pkgos-dh_auto_install --no-py2 --in-tmp45 pkgos-dh_auto_install --no-py2 --in-tmp
3946
40override_dh_install:47override_dh_install:
41 dh_install --sourcedir=debian/tmp48 dh_install --sourcedir=debian/tmp -Xdebian/swift-account-generator -Xdebian/swift-object-generator -Xdebian/swift-container-generator
42 dh_missing --fail-missing49 dh_missing --fail-missing
43 install -D -m 0640 $(CURDIR)/debian/account-server.conf $(CURDIR)/debian/python3-swift/etc/swift/account-server.conf50 install -D -m 0640 $(CURDIR)/debian/account-server.conf $(CURDIR)/debian/python3-swift/etc/swift/account-server.conf
44 install -D -m 0640 $(CURDIR)/debian/container-server.conf $(CURDIR)/debian/python3-swift/etc/swift/container-server.conf51 install -D -m 0640 $(CURDIR)/debian/container-server.conf $(CURDIR)/debian/python3-swift/etc/swift/container-server.conf
@@ -46,18 +53,20 @@ override_dh_install:
46 install -D -m 0640 $(CURDIR)/debian/object-expirer.conf $(CURDIR)/debian/python3-swift/etc/swift/object-expirer.conf53 install -D -m 0640 $(CURDIR)/debian/object-expirer.conf $(CURDIR)/debian/python3-swift/etc/swift/object-expirer.conf
4754
48override_dh_installinit:55override_dh_installinit:
49 dh_installinit --no-start56 set -e ; set -x ; \
50 dh_installinit --no-start -pswift-container --name=swift-container-replicator57 for FILE in $(sort $(patsubst debian/%,%,$(wildcard debian/*.init))) ; do \
51 dh_installinit --no-start -pswift-container --name=swift-container-auditor58 PKG=`echo $$FILE | cut -d. -f1` ; \
52 dh_installinit --no-start -pswift-container --name=swift-container-updater59 NAME=`echo $$FILE | cut -d. -f2` ; \
53 dh_installinit --no-start -pswift-container --name=swift-container-sync60 dh_installinit --error-handler=true -p$$PKG --name=$$NAME ;\
54 dh_installinit --no-start -pswift-account --name=swift-account-replicator61 done
55 dh_installinit --no-start -pswift-account --name=swift-account-auditor62
56 dh_installinit --no-start -pswift-account --name=swift-account-reaper63override_dh_installsystemd:
57 dh_installinit --no-start -pswift-object --name=swift-object-replicator64 set -e ; set -x ; \
58 dh_installinit --no-start -pswift-object --name=swift-object-auditor65 for FILE in $(sort $(patsubst debian/%,%,$(wildcard debian/*.service))) ; do \
59 dh_installinit --no-start -pswift-object --name=swift-object-updater66 PKG=`echo $$FILE | cut -d. -f1` ; \
60 dh_installinit --no-start -pswift-object --name=swift-object-reconstructor67 NAME=`echo $$FILE | cut -d. -f2` ; \
68 dh_installsystemd -p$$PKG --name=$$NAME ;\
69 done
6170
62override_dh_compress:71override_dh_compress:
63 dh_compress -Xconf-sample72 dh_compress -Xconf-sample
diff --git a/debian/swift-account-generator b/debian/swift-account-generator
64new file mode 10075573new file mode 100755
index 0000000..955c6e4
--- /dev/null
+++ b/debian/swift-account-generator
@@ -0,0 +1,32 @@
1#!/bin/sh
2
3# This systemd generator creates dependency symlinks that make all
4# Swift account servers be started/stopped/reloaded
5# when swift-account*.service is started/stopped/reloaded.
6
7set -eu
8
9GENDIR="$1"
10LIBDIR="/lib/systemd/system"
11CONFIG=/etc/swift/account-server
12
13if [ ! -d "$CONFIG" ] ; then
14 # Single config mode
15 exit 0
16fi
17
18for NAME in $CONFIG/* ; do
19 NAME=${NAME#$CONFIG}
20 NAME=${NAME#/}
21 NAME=${NAME%.conf}
22
23 for i in account account-auditor account-reaper account-replicator ; do
24 mkdir -p "$GENDIR/swift-$i.service.wants"
25 ln -s \
26 "$LIBDIR/swift-$i@.service" \
27 "$GENDIR/swift-$i.service.wants/swift-$i@$NAME.service"
28 done
29done
30
31exit 0
32
diff --git a/debian/swift-account.init b/debian/swift-account.init
0deleted file mode 10064433deleted file mode 100644
index 3eadb88..0000000
--- a/debian/swift-account.init
+++ /dev/null
@@ -1,49 +0,0 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-account
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift account server
9# Description: Account server for swift.
10### END INIT INFO
11
12SERVICE_NAME="account-server"
13PRINT_NAME="Swift account server"
14
15. /lib/lsb/init-functions
16
17if ! [ -x /usr/bin/swift-init ] ; then
18 exit 0
19fi
20
21if ! [ -f "/etc/swift/account-server.conf" ] ; then
22 exit 6
23fi
24
25case "$1" in
26start)
27 log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
28 /usr/bin/swift-init ${SERVICE_NAME} start
29 log_end_msg $?
30;;
31stop)
32 log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
33 /usr/bin/swift-init ${SERVICE_NAME} stop
34 log_end_msg $?
35;;
36restart|force-reload|reload)
37 log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
38 /usr/bin/swift-init ${SERVICE_NAME} reload
39;;
40status)
41 exec /usr/bin/swift-init ${SERVICE_NAME} status
42;;
43*)
44 echo "Usage: $0 {start|stop|restart|reload}"
45 exit 1
46;;
47esac
48
49exit 0
diff --git a/debian/swift-account.install b/debian/swift-account.install
index 576f829..2e6419a 100644
--- a/debian/swift-account.install
+++ b/debian/swift-account.install
@@ -1,3 +1,6 @@
1#! /usr/bin/dh-exec --with=install
2debian/swift-account-generator /lib/systemd/system-generators
3
1usr/bin/swift-account-audit4usr/bin/swift-account-audit
2usr/bin/swift-account-auditor5usr/bin/swift-account-auditor
3usr/bin/swift-account-info6usr/bin/swift-account-info
diff --git a/debian/swift-account.swift-account-auditor.init b/debian/swift-account.swift-account-auditor.init
4deleted file mode 1006447deleted file mode 100644
index 2cb92b4..0000000
--- a/debian/swift-account.swift-account-auditor.init
+++ /dev/null
@@ -1,49 +0,0 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-account-auditor
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift account auditor
9# Description: Account auditor for swift.
10### END INIT INFO
11
12SERVICE_NAME="account-auditor"
13PRINT_NAME="Swift account auditor"
14
15. /lib/lsb/init-functions
16
17if ! [ -x /usr/bin/swift-init ] ; then
18 exit 0
19fi
20
21if ! [ -f "/etc/swift/account-server.conf" ] ; then
22 exit 6
23fi
24
25case "$1" in
26start)
27 log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
28 /usr/bin/swift-init ${SERVICE_NAME} start
29 log_end_msg $?
30;;
31stop)
32 log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
33 /usr/bin/swift-init ${SERVICE_NAME} stop
34 log_end_msg $?
35;;
36restart|force-reload|reload)
37 log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
38 /usr/bin/swift-init ${SERVICE_NAME} reload
39;;
40status)
41 exec /usr/bin/swift-init ${SERVICE_NAME} status
42;;
43*)
44 echo "Usage: $0 {start|stop|restart|reload}"
45 exit 1
46;;
47esac
48
49exit 0
diff --git a/debian/swift-account.swift-account-auditor.init.in b/debian/swift-account.swift-account-auditor.init.in
50new file mode 1006440new file mode 100644
index 0000000..8289a92
--- /dev/null
+++ b/debian/swift-account.swift-account-auditor.init.in
@@ -0,0 +1,17 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-account-auditor
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift account auditor
9# Description: Account auditor server for Swift.
10### END INIT INFO
11
12PROJECT_NAME=swift
13NAME="${PROJECT_NAME}-account-auditor"
14DESC="OpenStack Swift account auditor"
15CONFIG=account-server
16MULTI=1
17SYSTEMD_DOC="man:${NAME}(1)"
diff --git a/debian/swift-account.swift-account-auditor.upstart b/debian/swift-account.swift-account-auditor.upstart
0deleted file mode 10064418deleted file mode 100644
index d490395..0000000
--- a/debian/swift-account.swift-account-auditor.upstart
+++ /dev/null
@@ -1,20 +0,0 @@
1# swift-account-auditor - SWIFT Account Auditor
2#
3# The swift account auditor.
4
5description "SWIFT Account Auditor"
6author "Marc Cluet <marc.cluet@ubuntu.com>"
7
8start on runlevel [2345]
9stop on runlevel [016]
10
11pre-start script
12 if [ -f "/etc/swift/account-server.conf" ]; then
13 exec /usr/bin/swift-init account-auditor start
14 else
15 exit 1
16 fi
17end script
18
19post-stop exec /usr/bin/swift-init account-auditor stop
20
diff --git a/debian/swift-account.swift-account-reaper.init b/debian/swift-account.swift-account-reaper.init
21deleted file mode 1006440deleted file mode 100644
index 4e39ab0..0000000
--- a/debian/swift-account.swift-account-reaper.init
+++ /dev/null
@@ -1,49 +0,0 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-account-reaper
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift account reaper
9# Description: Account reaper for swift.
10### END INIT INFO
11
12SERVICE_NAME="account-reaper"
13PRINT_NAME="Swift account reaper"
14
15. /lib/lsb/init-functions
16
17if ! [ -x /usr/bin/swift-init ] ; then
18 exit 0
19fi
20
21if ! [ -f "/etc/swift/account-server.conf" ] ; then
22 exit 6
23fi
24
25case "$1" in
26start)
27 log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
28 /usr/bin/swift-init ${SERVICE_NAME} start
29 log_end_msg $?
30;;
31stop)
32 log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
33 /usr/bin/swift-init ${SERVICE_NAME} stop
34 log_end_msg $?
35;;
36restart|force-reload|reload)
37 log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
38 /usr/bin/swift-init ${SERVICE_NAME} reload
39;;
40status)
41 exec /usr/bin/swift-init ${SERVICE_NAME} status
42;;
43*)
44 echo "Usage: $0 {start|stop|restart|reload}"
45 exit 1
46;;
47esac
48
49exit 0
diff --git a/debian/swift-account.swift-account-reaper.init.in b/debian/swift-account.swift-account-reaper.init.in
50new file mode 1006440new file mode 100644
index 0000000..ee73f62
--- /dev/null
+++ b/debian/swift-account.swift-account-reaper.init.in
@@ -0,0 +1,17 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-account-reaper
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift account reaper
9# Description: Account reaper for Swift.
10### END INIT INFO
11
12PROJECT_NAME=swift
13NAME="${PROJECT_NAME}-account-reaper"
14DESC="OpenStack Swift account reaper"
15CONFIG=account-server
16MULTI=1
17SYSTEMD_DOC="man:${NAME}(1)"
diff --git a/debian/swift-account.swift-account-reaper.upstart b/debian/swift-account.swift-account-reaper.upstart
0deleted file mode 10064418deleted file mode 100644
index a86ff6f..0000000
--- a/debian/swift-account.swift-account-reaper.upstart
+++ /dev/null
@@ -1,20 +0,0 @@
1# swift-account-reaper - SWIFT Account Reaper
2#
3# The swift account reaper.
4
5description "SWIFT Account Reaper"
6author "Marc Cluet <marc.cluet@ubuntu.com>"
7
8start on runlevel [2345]
9stop on runlevel [016]
10
11pre-start script
12 if [ -f "/etc/swift/account-server.conf" ]; then
13 exec /usr/bin/swift-init account-reaper start
14 else
15 exit 1
16 fi
17end script
18
19post-stop exec /usr/bin/swift-init account-reaper stop
20
diff --git a/debian/swift-account.swift-account-replicator.init b/debian/swift-account.swift-account-replicator.init
21deleted file mode 1006440deleted file mode 100644
index 2effcba..0000000
--- a/debian/swift-account.swift-account-replicator.init
+++ /dev/null
@@ -1,49 +0,0 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-account-replicator
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift account replicator
9# Description: Account replicator for swift.
10### END INIT INFO
11
12SERVICE_NAME="account-replicator"
13PRINT_NAME="Swift account replicator"
14
15. /lib/lsb/init-functions
16
17if ! [ -x /usr/bin/swift-init ] ; then
18 exit 0
19fi
20
21if ! [ -f "/etc/swift/account-server.conf" ] ; then
22 exit 6
23fi
24
25case "$1" in
26start)
27 log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
28 /usr/bin/swift-init ${SERVICE_NAME} start
29 log_end_msg $?
30;;
31stop)
32 log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
33 /usr/bin/swift-init ${SERVICE_NAME} stop
34 log_end_msg $?
35;;
36restart|force-reload|reload)
37 log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
38 /usr/bin/swift-init ${SERVICE_NAME} reload
39;;
40status)
41 exec /usr/bin/swift-init ${SERVICE_NAME} status
42;;
43*)
44 echo "Usage: $0 {start|stop|restart|reload}"
45 exit 1
46;;
47esac
48
49exit 0
diff --git a/debian/swift-account.swift-account-replicator.init.in b/debian/swift-account.swift-account-replicator.init.in
50new file mode 1006440new file mode 100644
index 0000000..d590827
--- /dev/null
+++ b/debian/swift-account.swift-account-replicator.init.in
@@ -0,0 +1,17 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-account-replicator
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift account replicator
9# Description: Account replicator for Swift.
10### END INIT INFO
11
12PROJECT_NAME=swift
13NAME="${PROJECT_NAME}-account-replicator"
14DESC="OpenStack Swift account replicator"
15CONFIG=account-server
16MULTI=1
17SYSTEMD_DOC="man:${NAME}(1)"
diff --git a/debian/swift-account.swift-account-replicator.upstart b/debian/swift-account.swift-account-replicator.upstart
0deleted file mode 10064418deleted file mode 100644
index 874da6e..0000000
--- a/debian/swift-account.swift-account-replicator.upstart
+++ /dev/null
@@ -1,20 +0,0 @@
1# swift-account-replicator - SWIFT Account Replicator
2#
3# The swift account replicator.
4
5description "SWIFT Account Replicator"
6author "Marc Cluet <marc.cluet@ubuntu.com>"
7
8start on runlevel [2345]
9stop on runlevel [016]
10
11pre-start script
12 if [ -f "/etc/swift/account-server.conf" ]; then
13 exec /usr/bin/swift-init account-replicator start
14 else
15 exit 1
16 fi
17end script
18
19post-stop exec /usr/bin/swift-init account-replicator stop
20
diff --git a/debian/swift-account.swift-account.init.in b/debian/swift-account.swift-account.init.in
21new file mode 1006440new file mode 100644
index 0000000..3f53057
--- /dev/null
+++ b/debian/swift-account.swift-account.init.in
@@ -0,0 +1,17 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-account
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift account server
9# Description: Account server for Swift.
10### END INIT INFO
11
12PROJECT_NAME=swift
13NAME="${PROJECT_NAME}-account-server"
14DESC="OpenStack Swift account server"
15CONFIG=account-server
16MULTI=1
17SYSTEMD_DOC="man:${NAME}(1)"
diff --git a/debian/swift-account.upstart b/debian/swift-account.upstart
0deleted file mode 10064418deleted file mode 100644
index f1d15f2..0000000
--- a/debian/swift-account.upstart
+++ /dev/null
@@ -1,20 +0,0 @@
1# swift-account-server - SWIFT Account Server
2#
3# The swift account server.
4
5description "SWIFT Account Server"
6author "Marc Cluet <marc.cluet@ubuntu.com>"
7
8start on runlevel [2345]
9stop on runlevel [016]
10
11pre-start script
12 if [ -f "/etc/swift/account-server.conf" ]; then
13 exec /usr/bin/swift-init account-server start
14 else
15 exit 1
16 fi
17end script
18
19post-stop exec /usr/bin/swift-init account-server stop
20
diff --git a/debian/swift-container-generator b/debian/swift-container-generator
21new file mode 1007550new file mode 100755
index 0000000..51e9515
--- /dev/null
+++ b/debian/swift-container-generator
@@ -0,0 +1,32 @@
1#!/bin/sh
2
3# This systemd generator creates dependency symlinks that make all
4# Swift account servers be started/stopped/reloaded
5# when swift-account*.service is started/stopped/reloaded.
6
7set -eu
8
9GENDIR="$1"
10LIBDIR="/lib/systemd/system"
11CONFIG=/etc/swift/account-server
12
13if [ ! -d "$CONFIG" ] ; then
14 # Single config mode
15 exit 0
16fi
17
18for NAME in $CONFIG/* ; do
19 NAME=${NAME#$CONFIG}
20 NAME=${NAME#/}
21 NAME=${NAME%.conf}
22
23 for i in container container-auditor container-replicator container-sharder container-sync container-updater ; do
24 mkdir -p "$GENDIR/swift-$i.service.wants"
25 ln -s \
26 "$LIBDIR/swift-$i@.service" \
27 "$GENDIR/swift-$i.service.wants/swift-$i@$NAME.service"
28 done
29done
30
31exit 0
32
diff --git a/debian/swift-container.init b/debian/swift-container.init
0deleted file mode 10064433deleted file mode 100644
index a320afc..0000000
--- a/debian/swift-container.init
+++ /dev/null
@@ -1,49 +0,0 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-container
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift container server
9# Description: Container server for swift.
10### END INIT INFO
11
12SERVICE_NAME="container-server"
13PRINT_NAME="Swift container server"
14
15. /lib/lsb/init-functions
16
17if ! [ -x /usr/bin/swift-init ] ; then
18 exit 0
19fi
20
21if ! [ -f "/etc/swift/container-server.conf" ] ; then
22 exit 6
23fi
24
25case "$1" in
26start)
27 log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
28 /usr/bin/swift-init ${SERVICE_NAME} start
29 log_end_msg $?
30;;
31stop)
32 log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
33 /usr/bin/swift-init ${SERVICE_NAME} stop
34 log_end_msg $?
35;;
36restart|force-reload|reload)
37 log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
38 /usr/bin/swift-init ${SERVICE_NAME} reload
39;;
40status)
41 exec /usr/bin/swift-init ${SERVICE_NAME} status
42;;
43*)
44 echo "Usage: $0 {start|stop|restart|reload}"
45 exit 1
46;;
47esac
48
49exit 0
diff --git a/debian/swift-container.install b/debian/swift-container.install
index 96f5112..f70a026 100644
--- a/debian/swift-container.install
+++ b/debian/swift-container.install
@@ -1,3 +1,6 @@
1#! /usr/bin/dh-exec --with=install
2debian/swift-container-generator /lib/systemd/system-generators
3
1usr/bin/swift-container-*4usr/bin/swift-container-*
2usr/bin/swift-manage-shard-ranges5usr/bin/swift-manage-shard-ranges
3usr/bin/swift-reconciler-enqueue6usr/bin/swift-reconciler-enqueue
diff --git a/debian/swift-container.swift-container-auditor.init b/debian/swift-container.swift-container-auditor.init
4deleted file mode 1006447deleted file mode 100644
index b81f3fb..0000000
--- a/debian/swift-container.swift-container-auditor.init
+++ /dev/null
@@ -1,49 +0,0 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-container-auditor
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift container auditor
9# Description: Container auditor for swift.
10### END INIT INFO
11
12SERVICE_NAME="container-auditor"
13PRINT_NAME="Swift container auditor"
14
15. /lib/lsb/init-functions
16
17if ! [ -x /usr/bin/swift-init ] ; then
18 exit 0
19fi
20
21if ! [ -f "/etc/swift/container-server.conf" ] ; then
22 exit 6
23fi
24
25case "$1" in
26start)
27 log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
28 /usr/bin/swift-init ${SERVICE_NAME} start
29 log_end_msg $?
30;;
31stop)
32 log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
33 /usr/bin/swift-init ${SERVICE_NAME} stop
34 log_end_msg $?
35;;
36restart|force-reload|reload)
37 log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
38 /usr/bin/swift-init ${SERVICE_NAME} reload
39;;
40status)
41 exec /usr/bin/swift-init ${SERVICE_NAME} status
42;;
43*)
44 echo "Usage: $0 {start|stop|restart|reload}"
45 exit 1
46;;
47esac
48
49exit 0
diff --git a/debian/swift-container.swift-container-auditor.init.in b/debian/swift-container.swift-container-auditor.init.in
50new file mode 1006440new file mode 100644
index 0000000..ce7c48f
--- /dev/null
+++ b/debian/swift-container.swift-container-auditor.init.in
@@ -0,0 +1,17 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-container-auditor
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift container auditor
9# Description: Container auditor server for Swift.
10### END INIT INFO
11
12PROJECT_NAME=swift
13NAME="${PROJECT_NAME}-container-auditor"
14DESC="OpenStack Swift container auditor"
15CONFIG=container-server
16MULTI=1
17SYSTEMD_DOC="man:${NAME}(1)"
diff --git a/debian/swift-container.swift-container-auditor.upstart b/debian/swift-container.swift-container-auditor.upstart
0deleted file mode 10064418deleted file mode 100644
index 091df78..0000000
--- a/debian/swift-container.swift-container-auditor.upstart
+++ /dev/null
@@ -1,20 +0,0 @@
1# swift-container-auditor - SWIFT Container Auditor
2#
3# The swift container auditor.
4
5description "SWIFT Container Auditor"
6author "Marc Cluet <marc.cluet@ubuntu.com>"
7
8start on runlevel [2345]
9stop on runlevel [016]
10
11pre-start script
12 if [ -f "/etc/swift/container-server.conf" ]; then
13 exec /usr/bin/swift-init container-auditor start
14 else
15 exit 1
16 fi
17end script
18
19post-stop exec /usr/bin/swift-init container-auditor stop
20
diff --git a/debian/swift-container.swift-container-reconciler.init.in b/debian/swift-container.swift-container-reconciler.init.in
21new file mode 1006440new file mode 100644
index 0000000..d566089
--- /dev/null
+++ b/debian/swift-container.swift-container-reconciler.init.in
@@ -0,0 +1,16 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-container-reconciler
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift container reconciler
9# Description: Container reconciler for Swift.
10### END INIT INFO
11
12PROJECT_NAME=swift
13NAME="${PROJECT_NAME}-container-reconciler"
14DESC="OpenStack Swift container reconciler"
15CONFIG=container-reconciler
16SYSTEMD_DOC="man:${NAME}(1)"
diff --git a/debian/swift-container.swift-container-replicator.init b/debian/swift-container.swift-container-replicator.init
0deleted file mode 10064417deleted file mode 100644
index 5a906e5..0000000
--- a/debian/swift-container.swift-container-replicator.init
+++ /dev/null
@@ -1,49 +0,0 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-container-replicator
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift container replicator
9# Description: Container replicator for swift.
10### END INIT INFO
11
12SERVICE_NAME="container-replicator"
13PRINT_NAME="Swift container replicator"
14
15. /lib/lsb/init-functions
16
17if ! [ -x /usr/bin/swift-init ] ; then
18 exit 0
19fi
20
21if ! [ -f "/etc/swift/container-server.conf" ] ; then
22 exit 6
23fi
24
25case "$1" in
26start)
27 log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
28 /usr/bin/swift-init ${SERVICE_NAME} start
29 log_end_msg $?
30;;
31stop)
32 log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
33 /usr/bin/swift-init ${SERVICE_NAME} stop
34 log_end_msg $?
35;;
36restart|force-reload|reload)
37 log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
38 /usr/bin/swift-init ${SERVICE_NAME} reload
39;;
40status)
41 exec /usr/bin/swift-init ${SERVICE_NAME} status
42;;
43*)
44 echo "Usage: $0 {start|stop|restart|reload}"
45 exit 1
46;;
47esac
48
49exit 0
diff --git a/debian/swift-container.swift-container-replicator.init.in b/debian/swift-container.swift-container-replicator.init.in
50new file mode 1006440new file mode 100644
index 0000000..4b989d5
--- /dev/null
+++ b/debian/swift-container.swift-container-replicator.init.in
@@ -0,0 +1,17 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-container-replicator
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift container replicator
9# Description: Container replicator for Swift.
10### END INIT INFO
11
12PROJECT_NAME=swift
13NAME="${PROJECT_NAME}-container-replicator"
14DESC="OpenStack Swift container replicator"
15CONFIG=container-server
16MULTI=1
17SYSTEMD_DOC="man:${NAME}(1)"
diff --git a/debian/swift-container.swift-container-replicator.upstart b/debian/swift-container.swift-container-replicator.upstart
0deleted file mode 10064418deleted file mode 100644
index 0583c94..0000000
--- a/debian/swift-container.swift-container-replicator.upstart
+++ /dev/null
@@ -1,20 +0,0 @@
1# swift-container-replicator - SWIFT Container Replicator
2#
3# The swift container replicator.
4
5description "SWIFT Container Replicator"
6author "Marc Cluet <marc.cluet@ubuntu.com>"
7
8start on runlevel [2345]
9stop on runlevel [016]
10
11pre-start script
12 if [ -f "/etc/swift/container-server.conf" ]; then
13 exec /usr/bin/swift-init container-replicator start
14 else
15 exit 1
16 fi
17end script
18
19post-stop exec /usr/bin/swift-init container-replicator stop
20
diff --git a/debian/swift-container.swift-container-sharder.init b/debian/swift-container.swift-container-sharder.init
21deleted file mode 1006440deleted file mode 100644
index 232258f..0000000
--- a/debian/swift-container.swift-container-sharder.init
+++ /dev/null
@@ -1,49 +0,0 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-container-sharder
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift container sharder
9# Description: Container sharder for swift.
10### END INIT INFO
11
12SERVICE_NAME="container-sharder"
13PRINT_NAME="Swift container sharder"
14
15. /lib/lsb/init-functions
16
17if ! [ -x /usr/bin/swift-init ] ; then
18 exit 0
19fi
20
21if ! [ -f "/etc/swift/container-server.conf" ] ; then
22 exit 6
23fi
24
25case "$1" in
26start)
27 log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
28 /usr/bin/swift-init ${SERVICE_NAME} start
29 log_end_msg $?
30;;
31stop)
32 log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
33 /usr/bin/swift-init ${SERVICE_NAME} stop
34 log_end_msg $?
35;;
36restart|force-reload|reload)
37 log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
38 /usr/bin/swift-init ${SERVICE_NAME} reload
39;;
40status)
41 exec /usr/bin/swift-init ${SERVICE_NAME} status
42;;
43*)
44 echo "Usage: $0 {start|stop|restart|reload}"
45 exit 1
46;;
47esac
48
49exit 0
diff --git a/debian/swift-container.swift-container-sharder.init.in b/debian/swift-container.swift-container-sharder.init.in
50new file mode 1006440new file mode 100644
index 0000000..9ea0e04
--- /dev/null
+++ b/debian/swift-container.swift-container-sharder.init.in
@@ -0,0 +1,17 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-container-sharder
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift container sharder
9# Description: Container sharder for Swift.
10### END INIT INFO
11
12PROJECT_NAME=swift
13NAME="${PROJECT_NAME}-container-sharder"
14DESC="OpenStack Swift container sharder"
15CONFIG=container-server
16MULTI=1
17SYSTEMD_DOC="man:${NAME}(1)"
diff --git a/debian/swift-container.swift-container-sync.init b/debian/swift-container.swift-container-sync.init
0deleted file mode 10064418deleted file mode 100644
index 098706a..0000000
--- a/debian/swift-container.swift-container-sync.init
+++ /dev/null
@@ -1,49 +0,0 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-container-sync
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift container sync
9# Description: Container sync for swift.
10### END INIT INFO
11
12SERVICE_NAME="container-sync"
13PRINT_NAME="Swift container sync"
14
15. /lib/lsb/init-functions
16
17if ! [ -x /usr/bin/swift-init ] ; then
18 exit 0
19fi
20
21if ! [ -f "/etc/swift/container-server.conf" ] ; then
22 exit 6
23fi
24
25case "$1" in
26start)
27 log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
28 /usr/bin/swift-init ${SERVICE_NAME} start
29 log_end_msg $?
30;;
31stop)
32 log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
33 /usr/bin/swift-init ${SERVICE_NAME} stop
34 log_end_msg $?
35;;
36restart|force-reload|reload)
37 log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
38 /usr/bin/swift-init ${SERVICE_NAME} reload
39;;
40status)
41 exec /usr/bin/swift-init ${SERVICE_NAME} status
42;;
43*)
44 echo "Usage: $0 {start|stop|restart|reload}"
45 exit 1
46;;
47esac
48
49exit 0
diff --git a/debian/swift-container.swift-container-sync.init.in b/debian/swift-container.swift-container-sync.init.in
50new file mode 1006440new file mode 100644
index 0000000..c24e790
--- /dev/null
+++ b/debian/swift-container.swift-container-sync.init.in
@@ -0,0 +1,17 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-container-sync
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift container sync
9# Description: Container sync server for Swift.
10### END INIT INFO
11
12PROJECT_NAME=swift
13NAME="${PROJECT_NAME}-container-sync"
14DESC="OpenStack Swift container sync"
15CONFIG=container-server
16MULTI=1
17SYSTEMD_DOC="man:${NAME}(1)"
diff --git a/debian/swift-container.swift-container-sync.upstart b/debian/swift-container.swift-container-sync.upstart
0deleted file mode 10064418deleted file mode 100644
index 6a5c320..0000000
--- a/debian/swift-container.swift-container-sync.upstart
+++ /dev/null
@@ -1,15 +0,0 @@
1description "SWIFT Container Sync"
2author "James Page <james.page@ubuntu.com>"
3
4start on runlevel [2345]
5stop on runlevel [016]
6
7pre-start script
8 if [ -f "/etc/swift/container-server.conf" ]; then
9 exec /usr/bin/swift-init container-sync start
10 else
11 exit 1
12 fi
13end script
14
15post-stop exec /usr/bin/swift-init container-sync stop
diff --git a/debian/swift-container.swift-container-updater.init b/debian/swift-container.swift-container-updater.init
16deleted file mode 1006440deleted file mode 100644
index 7082e8f..0000000
--- a/debian/swift-container.swift-container-updater.init
+++ /dev/null
@@ -1,49 +0,0 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-container-updater
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift container updater
9# Description: Container updater for swift.
10### END INIT INFO
11
12SERVICE_NAME="container-updater"
13PRINT_NAME="Swift container updater"
14
15. /lib/lsb/init-functions
16
17if ! [ -x /usr/bin/swift-init ] ; then
18 exit 0
19fi
20
21if ! [ -f "/etc/swift/container-server.conf" ] ; then
22 exit 6
23fi
24
25case "$1" in
26start)
27 log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
28 /usr/bin/swift-init ${SERVICE_NAME} start
29 log_end_msg $?
30;;
31stop)
32 log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
33 /usr/bin/swift-init ${SERVICE_NAME} stop
34 log_end_msg $?
35;;
36restart|force-reload|reload)
37 log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
38 /usr/bin/swift-init ${SERVICE_NAME} reload
39;;
40status)
41 exec /usr/bin/swift-init ${SERVICE_NAME} status
42;;
43*)
44 echo "Usage: $0 {start|stop|restart|reload}"
45 exit 1
46;;
47esac
48
49exit 0
diff --git a/debian/swift-container.swift-container-updater.init.in b/debian/swift-container.swift-container-updater.init.in
50new file mode 1006440new file mode 100644
index 0000000..73c5f36
--- /dev/null
+++ b/debian/swift-container.swift-container-updater.init.in
@@ -0,0 +1,17 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-container-updater
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift container updater
9# Description: Container updater server for Swift.
10### END INIT INFO
11
12PROJECT_NAME=swift
13NAME="${PROJECT_NAME}-container-updater"
14DESC="OpenStack Swift container updater"
15CONFIG=container-server
16MULTI=1
17SYSTEMD_DOC="man:${NAME}(1)"
diff --git a/debian/swift-container.swift-container-updater.upstart b/debian/swift-container.swift-container-updater.upstart
0deleted file mode 10064418deleted file mode 100644
index f41895b..0000000
--- a/debian/swift-container.swift-container-updater.upstart
+++ /dev/null
@@ -1,20 +0,0 @@
1# swift-container-updater - SWIFT Container Updater
2#
3# The swift container updater.
4
5description "SWIFT Container Updater"
6author "Marc Cluet <marc.cluet@ubuntu.com>"
7
8start on runlevel [2345]
9stop on runlevel [016]
10
11pre-start script
12 if [ -f "/etc/swift/container-server.conf" ]; then
13 exec /usr/bin/swift-init container-updater start
14 else
15 exit 1
16 fi
17end script
18
19post-stop exec /usr/bin/swift-init container-updater stop
20
diff --git a/debian/swift-container.swift-container.init.in b/debian/swift-container.swift-container.init.in
21new file mode 1006440new file mode 100644
index 0000000..a12c3df
--- /dev/null
+++ b/debian/swift-container.swift-container.init.in
@@ -0,0 +1,17 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-container
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift container server
9# Description: Container server for Swift.
10### END INIT INFO
11
12PROJECT_NAME=swift
13NAME="${PROJECT_NAME}-container-server"
14DESC="OpenStack Swift container server"
15CONFIG=container-server
16MULTI=1
17SYSTEMD_DOC="man:${NAME}(1)"
diff --git a/debian/swift-container.upstart b/debian/swift-container.upstart
0deleted file mode 10064418deleted file mode 100644
index 8035002..0000000
--- a/debian/swift-container.upstart
+++ /dev/null
@@ -1,20 +0,0 @@
1# swift-container-server - SWIFT Container Server
2#
3# The swift container server.
4
5description "SWIFT Container Server"
6author "Marc Cluet <marc.cluet@ubuntu.com>"
7
8start on runlevel [2345]
9stop on runlevel [016]
10
11pre-start script
12 if [ -f "/etc/swift/container-server.conf" ]; then
13 exec /usr/bin/swift-init container-server start
14 else
15 exit 1
16 fi
17end script
18
19post-stop exec /usr/bin/swift-init container-server stop
20
diff --git a/debian/swift-object-expirer.init b/debian/swift-object-expirer.init
21deleted file mode 1006440deleted file mode 100644
index 2800190..0000000
--- a/debian/swift-object-expirer.init
+++ /dev/null
@@ -1,49 +0,0 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-object-expirer
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift object expirer
9# Description: Object expirer for swift.
10### END INIT INFO
11
12SERVICE_NAME="object-expirer"
13PRINT_NAME="Swift object expirer"
14
15. /lib/lsb/init-functions
16
17if ! [ -x /usr/bin/swift-init ] ; then
18 exit 0
19fi
20
21if ! [ -f "/etc/swift/object-expirer.conf" ] ; then
22 exit 6
23fi
24
25case "$1" in
26start)
27 log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
28 /usr/bin/swift-init ${SERVICE_NAME} start
29 log_end_msg $?
30;;
31stop)
32 log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
33 /usr/bin/swift-init ${SERVICE_NAME} stop
34 log_end_msg $?
35;;
36restart|force-reload|reload)
37 log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
38 /usr/bin/swift-init ${SERVICE_NAME} reload
39;;
40status)
41 exec /usr/bin/swift-init ${SERVICE_NAME} status
42;;
43*)
44 echo "Usage: $0 {start|stop|restart|reload}"
45 exit 1
46;;
47esac
48
49exit 0
diff --git a/debian/swift-object-expirer.swift-object-expirer.init.in b/debian/swift-object-expirer.swift-object-expirer.init.in
50new file mode 1006440new file mode 100644
index 0000000..ead7164
--- /dev/null
+++ b/debian/swift-object-expirer.swift-object-expirer.init.in
@@ -0,0 +1,16 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-object-expirer
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift object expirer
9# Description: Object expirer daemon for Swift.
10### END INIT INFO
11
12PROJECT_NAME=swift
13NAME="${PROJECT_NAME}-object-expirer"
14DESC="OpenStack Swift object expirer"
15CONFIG=object-expirer
16SYSTEMD_DOC="man:${NAME}(1)"
diff --git a/debian/swift-object-expirer.upstart b/debian/swift-object-expirer.upstart
0deleted file mode 10064417deleted file mode 100644
index 6ac508a..0000000
--- a/debian/swift-object-expirer.upstart
+++ /dev/null
@@ -1,15 +0,0 @@
1description "SWIFT Object Expirer"
2author "Will Kelly <william.kelly@rackspace.com>"
3
4start on runlevel [2345]
5stop on runlevel [016]
6
7pre-start script
8 if [ -f "/etc/swift/object-expirer.conf" ]; then
9 exec /usr/bin/swift-init object-expirer start
10 else
11 exit 1
12 fi
13end script
14
15post-stop exec /usr/bin/swift-init object-expirer stop
diff --git a/debian/swift-object-generator b/debian/swift-object-generator
16new file mode 1007550new file mode 100755
index 0000000..91dae09
--- /dev/null
+++ b/debian/swift-object-generator
@@ -0,0 +1,32 @@
1#!/bin/sh
2
3# This systemd generator creates dependency symlinks that make all
4# Swift account servers be started/stopped/reloaded
5# when swift-account*.service is started/stopped/reloaded.
6
7set -eu
8
9GENDIR="$1"
10LIBDIR="/lib/systemd/system"
11CONFIG=/etc/swift/account-server
12
13if [ ! -d "$CONFIG" ] ; then
14 # Single config mode
15 exit 0
16fi
17
18for NAME in $CONFIG/* ; do
19 NAME=${NAME#$CONFIG}
20 NAME=${NAME#/}
21 NAME=${NAME%.conf}
22
23 for i in object object-auditor object-reconstructor object-replicator object-updater ; do
24 mkdir -p "$GENDIR/swift-$i.service.wants"
25 ln -s \
26 "$LIBDIR/swift-$i@.service" \
27 "$GENDIR/swift-$i.service.wants/swift-$i@$NAME.service"
28 done
29done
30
31exit 0
32
diff --git a/debian/swift-object.init b/debian/swift-object.init
0deleted file mode 10064433deleted file mode 100644
index 13609a7..0000000
--- a/debian/swift-object.init
+++ /dev/null
@@ -1,49 +0,0 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-object
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift object server
9# Description: Object server for swift.
10### END INIT INFO
11
12SERVICE_NAME="object-server"
13PRINT_NAME="Swift object server"
14
15. /lib/lsb/init-functions
16
17if ! [ -x /usr/bin/swift-init ] ; then
18 exit 0
19fi
20
21if ! [ -f "/etc/swift/object-server.conf" ] ; then
22 exit 6
23fi
24
25case "$1" in
26start)
27 log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
28 /usr/bin/swift-init ${SERVICE_NAME} start
29 log_end_msg $?
30;;
31stop)
32 log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
33 /usr/bin/swift-init ${SERVICE_NAME} stop
34 log_end_msg $?
35;;
36restart|force-reload|reload)
37 log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
38 /usr/bin/swift-init ${SERVICE_NAME} reload
39;;
40status)
41 exec /usr/bin/swift-init ${SERVICE_NAME} status
42;;
43*)
44 echo "Usage: $0 {start|stop|restart|reload}"
45 exit 1
46;;
47esac
48
49exit 0
diff --git a/debian/swift-object.install b/debian/swift-object.install
index 44a67e0..eff451b 100644
--- a/debian/swift-object.install
+++ b/debian/swift-object.install
@@ -1,3 +1,6 @@
1#! /usr/bin/dh-exec --with=install
2debian/swift-object-generator /lib/systemd/system-generators
3
1usr/bin/swift-object-auditor4usr/bin/swift-object-auditor
2usr/bin/swift-object-info5usr/bin/swift-object-info
3usr/bin/swift-object-reconstructor6usr/bin/swift-object-reconstructor
diff --git a/debian/swift-object.swift-object-auditor.init b/debian/swift-object.swift-object-auditor.init
4deleted file mode 1006447deleted file mode 100644
index 0a92df5..0000000
--- a/debian/swift-object.swift-object-auditor.init
+++ /dev/null
@@ -1,49 +0,0 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-object-auditor
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift object auditor
9# Description: Object auditor for swift.
10### END INIT INFO
11
12SERVICE_NAME="object-auditor"
13PRINT_NAME="Swift object auditor"
14
15. /lib/lsb/init-functions
16
17if ! [ -x /usr/bin/swift-init ] ; then
18 exit 0
19fi
20
21if ! [ -f "/etc/swift/object-server.conf" ] ; then
22 exit 6
23fi
24
25case "$1" in
26start)
27 log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
28 /usr/bin/swift-init ${SERVICE_NAME} start
29 log_end_msg $?
30;;
31stop)
32 log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
33 /usr/bin/swift-init ${SERVICE_NAME} stop
34 log_end_msg $?
35;;
36restart|force-reload|reload)
37 log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
38 /usr/bin/swift-init ${SERVICE_NAME} reload
39;;
40status)
41 exec /usr/bin/swift-init ${SERVICE_NAME} status
42;;
43*)
44 echo "Usage: $0 {start|stop|restart|reload}"
45 exit 1
46;;
47esac
48
49exit 0
diff --git a/debian/swift-object.swift-object-auditor.init.in b/debian/swift-object.swift-object-auditor.init.in
50new file mode 1006440new file mode 100644
index 0000000..53b0ce5
--- /dev/null
+++ b/debian/swift-object.swift-object-auditor.init.in
@@ -0,0 +1,17 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-object-auditor
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift object auditor
9# Description: Object auditor server for Swift.
10### END INIT INFO
11
12PROJECT_NAME=swift
13NAME="${PROJECT_NAME}-object-auditor"
14DESC="OpenStack Swift object auditor"
15CONFIG=object-server
16MULTI=1
17SYSTEMD_DOC="man:${NAME}(1)"
diff --git a/debian/swift-object.swift-object-auditor.upstart b/debian/swift-object.swift-object-auditor.upstart
0deleted file mode 10064418deleted file mode 100644
index af5b76d..0000000
--- a/debian/swift-object.swift-object-auditor.upstart
+++ /dev/null
@@ -1,20 +0,0 @@
1# swift-object-auditor - SWIFT Object Auditor
2#
3# The swift object auditor.
4
5description "SWIFT Object Auditor"
6author "Marc Cluet <marc.cluet@ubuntu.com>"
7
8start on runlevel [2345]
9stop on runlevel [016]
10
11pre-start script
12 if [ -f "/etc/swift/object-server.conf" ]; then
13 exec /usr/bin/swift-init object-auditor start
14 else
15 exit 1
16 fi
17end script
18
19post-stop exec /usr/bin/swift-init object-auditor stop
20
diff --git a/debian/swift-object.swift-object-reconstructor.init b/debian/swift-object.swift-object-reconstructor.init
21deleted file mode 1006440deleted file mode 100644
index 20a1b5e..0000000
--- a/debian/swift-object.swift-object-reconstructor.init
+++ /dev/null
@@ -1,49 +0,0 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-object-reconstructor
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift object reconstructor
9# Description: Object reconstructor for swift.
10### END INIT INFO
11
12SERVICE_NAME="object-reconstructor"
13PRINT_NAME="Swift object reconstructor"
14
15. /lib/lsb/init-functions
16
17if ! [ -x /usr/bin/swift-init ] ; then
18 exit 0
19fi
20
21if ! [ -f "/etc/swift/object-server.conf" ] ; then
22 exit 6
23fi
24
25case "$1" in
26start)
27 log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
28 /usr/bin/swift-init ${SERVICE_NAME} start
29 log_end_msg $?
30;;
31stop)
32 log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
33 /usr/bin/swift-init ${SERVICE_NAME} stop
34 log_end_msg $?
35;;
36restart|force-reload|reload)
37 log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
38 /usr/bin/swift-init ${SERVICE_NAME} reload
39;;
40status)
41 exec /usr/bin/swift-init ${SERVICE_NAME} status
42;;
43*)
44 echo "Usage: $0 {start|stop|restart|reload}"
45 exit 1
46;;
47esac
48
49exit 0
diff --git a/debian/swift-object.swift-object-reconstructor.init.in b/debian/swift-object.swift-object-reconstructor.init.in
50new file mode 1006440new file mode 100644
index 0000000..6324e00
--- /dev/null
+++ b/debian/swift-object.swift-object-reconstructor.init.in
@@ -0,0 +1,17 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-object-reconstructor
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift object reconstructor
9# Description: Object reconstructor server for Swift.
10### END INIT INFO
11
12PROJECT_NAME=swift
13NAME="${PROJECT_NAME}-object-reconstructor"
14DESC="OpenStack Swift object reconstructor"
15CONFIG=object-server
16MULTI=1
17SYSTEMD_DOC="man:${NAME}(1)"
diff --git a/debian/swift-object.swift-object-reconstructor.upstart b/debian/swift-object.swift-object-reconstructor.upstart
0deleted file mode 10064418deleted file mode 100644
index 987f8ab..0000000
--- a/debian/swift-object.swift-object-reconstructor.upstart
+++ /dev/null
@@ -1,20 +0,0 @@
1# swift-object-reconstructor - SWIFT Object Reconstuctor
2#
3# The swift object reconstructor.
4
5description "SWIFT Object Reconstuctor"
6author "Marc Cluet <marc.cluet@ubuntu.com>"
7
8start on runlevel [2345]
9stop on runlevel [016]
10
11pre-start script
12 if [ -f "/etc/swift/object-server.conf" ]; then
13 exec /usr/bin/swift-init object-reconstructor start
14 else
15 exit 1
16 fi
17end script
18
19post-stop exec /usr/bin/swift-init object-reconstructor stop
20
diff --git a/debian/swift-object.swift-object-replicator.init b/debian/swift-object.swift-object-replicator.init
21deleted file mode 1006440deleted file mode 100644
index ec6fd50..0000000
--- a/debian/swift-object.swift-object-replicator.init
+++ /dev/null
@@ -1,49 +0,0 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-object-replicator
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift object replicator
9# Description: Object replicator for swift.
10### END INIT INFO
11
12SERVICE_NAME="object-replicator"
13PRINT_NAME="Swift object replicator"
14
15. /lib/lsb/init-functions
16
17if ! [ -x /usr/bin/swift-init ] ; then
18 exit 0
19fi
20
21if ! [ -f "/etc/swift/object-server.conf" ] ; then
22 exit 6
23fi
24
25case "$1" in
26start)
27 log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
28 /usr/bin/swift-init ${SERVICE_NAME} start
29 log_end_msg $?
30;;
31stop)
32 log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
33 /usr/bin/swift-init ${SERVICE_NAME} stop
34 log_end_msg $?
35;;
36restart|force-reload|reload)
37 log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
38 /usr/bin/swift-init ${SERVICE_NAME} reload
39;;
40status)
41 exec /usr/bin/swift-init ${SERVICE_NAME} status
42;;
43*)
44 echo "Usage: $0 {start|stop|restart|reload}"
45 exit 1
46;;
47esac
48
49exit 0
diff --git a/debian/swift-object.swift-object-replicator.init.in b/debian/swift-object.swift-object-replicator.init.in
50new file mode 1006440new file mode 100644
index 0000000..22f48f9
--- /dev/null
+++ b/debian/swift-object.swift-object-replicator.init.in
@@ -0,0 +1,17 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-object-replicator
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift object replicator
9# Description: Object replicator server for Swift.
10### END INIT INFO
11
12PROJECT_NAME=swift
13NAME="${PROJECT_NAME}-object-replicator"
14DESC="OpenStack Swift object replicator"
15CONFIG=object-server
16MULTI=1
17SYSTEMD_DOC="man:${NAME}(1)"
diff --git a/debian/swift-object.swift-object-replicator.upstart b/debian/swift-object.swift-object-replicator.upstart
0deleted file mode 10064418deleted file mode 100644
index 6666e0d..0000000
--- a/debian/swift-object.swift-object-replicator.upstart
+++ /dev/null
@@ -1,20 +0,0 @@
1# swift-object-replicator - SWIFT Object Replicator
2#
3# The swift object replicator.
4
5description "SWIFT Object Replicator"
6author "Marc Cluet <marc.cluet@ubuntu.com>"
7
8start on runlevel [2345]
9stop on runlevel [016]
10
11pre-start script
12 if [ -f "/etc/swift/object-server.conf" ]; then
13 exec /usr/bin/swift-init object-replicator start
14 else
15 exit 1
16 fi
17end script
18
19post-stop exec /usr/bin/swift-init object-replicator stop
20
diff --git a/debian/swift-object.swift-object-updater.init b/debian/swift-object.swift-object-updater.init
21deleted file mode 1006440deleted file mode 100644
index 8430640..0000000
--- a/debian/swift-object.swift-object-updater.init
+++ /dev/null
@@ -1,49 +0,0 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-object-updater
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift object updater
9# Description: Object updater for swift.
10### END INIT INFO
11
12SERVICE_NAME="object-updater"
13PRINT_NAME="Swift object updater"
14
15. /lib/lsb/init-functions
16
17if ! [ -x /usr/bin/swift-init ] ; then
18 exit 0
19fi
20
21if ! [ -f "/etc/swift/object-server.conf" ] ; then
22 exit 6
23fi
24
25case "$1" in
26start)
27 log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
28 /usr/bin/swift-init ${SERVICE_NAME} start
29 log_end_msg $?
30;;
31stop)
32 log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
33 /usr/bin/swift-init ${SERVICE_NAME} stop
34 log_end_msg $?
35;;
36restart|force-reload|reload)
37 log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
38 /usr/bin/swift-init ${SERVICE_NAME} reload
39;;
40status)
41 exec /usr/bin/swift-init ${SERVICE_NAME} status
42;;
43*)
44 echo "Usage: $0 {start|stop|restart|reload}"
45 exit 1
46;;
47esac
48
49exit 0
diff --git a/debian/swift-object.swift-object-updater.init.in b/debian/swift-object.swift-object-updater.init.in
50new file mode 1006440new file mode 100644
index 0000000..651f3a5
--- /dev/null
+++ b/debian/swift-object.swift-object-updater.init.in
@@ -0,0 +1,17 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-object-updater
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift object updater
9# Description: Object updater server for Swift.
10### END INIT INFO
11
12PROJECT_NAME=swift
13NAME="${PROJECT_NAME}-object-updater"
14DESC="OpenStack Swift object updater"
15CONFIG=object-server
16MULTI=1
17SYSTEMD_DOC="man:${NAME}(1)"
diff --git a/debian/swift-object.swift-object-updater.upstart b/debian/swift-object.swift-object-updater.upstart
0deleted file mode 10064418deleted file mode 100644
index 3c028bf..0000000
--- a/debian/swift-object.swift-object-updater.upstart
+++ /dev/null
@@ -1,20 +0,0 @@
1# swift-object-updater - SWIFT Object Updater
2#
3# The swift object updater.
4
5description "SWIFT Object Updater"
6author "Marc Cluet <marc.cluet@ubuntu.com>"
7
8start on runlevel [2345]
9stop on runlevel [016]
10
11pre-start script
12 if [ -f "/etc/swift/object-server.conf" ]; then
13 exec /usr/bin/swift-init object-updater start
14 else
15 exit 1
16 fi
17end script
18
19post-stop exec /usr/bin/swift-init object-updater stop
20
diff --git a/debian/swift-object.swift-object.init.in b/debian/swift-object.swift-object.init.in
21new file mode 1006440new file mode 100644
index 0000000..047ac51
--- /dev/null
+++ b/debian/swift-object.swift-object.init.in
@@ -0,0 +1,17 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-object
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift object server
9# Description: Object server for Swift.
10### END INIT INFO
11
12PROJECT_NAME=swift
13NAME="${PROJECT_NAME}-object-server"
14DESC="OpenStack Swift object server"
15CONFIG=object-server
16MULTI=1
17SYSTEMD_DOC="man:${NAME}(1)"
diff --git a/debian/swift-object.upstart b/debian/swift-object.upstart
0deleted file mode 10064418deleted file mode 100644
index 3ef4324..0000000
--- a/debian/swift-object.upstart
+++ /dev/null
@@ -1,20 +0,0 @@
1# swift-object-server - SWIFT Object Server
2#
3# The swift object server.
4
5description "SWIFT Object Server"
6author "Marc Cluet <marc.cluet@ubuntu.com>"
7
8start on runlevel [2345]
9stop on runlevel [016]
10
11pre-start script
12 if [ -f "/etc/swift/object-server.conf" ]; then
13 exec /usr/bin/swift-init object-server start
14 else
15 exit 1
16 fi
17end script
18
19post-stop exec /usr/bin/swift-init object-server stop
20
diff --git a/debian/swift-proxy.init b/debian/swift-proxy.init
21deleted file mode 1006440deleted file mode 100644
index 7a2193a..0000000
--- a/debian/swift-proxy.init
+++ /dev/null
@@ -1,49 +0,0 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-proxy
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift proxy server
9# Description: Proxy server for swift.
10### END INIT INFO
11
12SERVICE_NAME="proxy-server"
13PRINT_NAME="Swift proxy server"
14
15. /lib/lsb/init-functions
16
17if ! [ -x /usr/bin/swift-init ] ; then
18 exit 0
19fi
20
21if ! [ -f "/etc/swift/proxy-server.conf" ] ; then
22 exit 6
23fi
24
25case "$1" in
26start)
27 log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
28 /usr/bin/swift-init ${SERVICE_NAME} start
29 log_end_msg $?
30;;
31stop)
32 log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
33 /usr/bin/swift-init ${SERVICE_NAME} stop
34 log_end_msg $?
35;;
36restart|force-reload|reload)
37 log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
38 /usr/bin/swift-init ${SERVICE_NAME} reload
39;;
40status)
41 exec /usr/bin/swift-init ${SERVICE_NAME} status
42;;
43*)
44 echo "Usage: $0 {start|stop|restart|reload}"
45 exit 1
46;;
47esac
48
49exit 0
diff --git a/debian/swift-proxy.swift-proxy.init.in b/debian/swift-proxy.swift-proxy.init.in
50new file mode 1006440new file mode 100644
index 0000000..1ae17ac
--- /dev/null
+++ b/debian/swift-proxy.swift-proxy.init.in
@@ -0,0 +1,17 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: swift-proxy
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Swift proxy server
9# Description: Proxy server for Swift.
10### END INIT INFO
11
12PROJECT_NAME=swift
13NAME="${PROJECT_NAME}-proxy-server"
14DESC="OpenStack Swift proxy server"
15CONFIG=proxy-server
16MULTI=1
17SYSTEMD_DOC="man:${NAME}(1)"
diff --git a/debian/swift-proxy.upstart b/debian/swift-proxy.upstart
0deleted file mode 10064418deleted file mode 100644
index 8947c51..0000000
--- a/debian/swift-proxy.upstart
+++ /dev/null
@@ -1,20 +0,0 @@
1# swift-proxy - SWIFT Proxy Server
2#
3# The swift proxy server.
4
5description "SWIFT Proxy Server"
6author "Marc Cluet <marc.cluet@ubuntu.com>"
7
8start on runlevel [2345]
9stop on runlevel [016]
10
11pre-start script
12 if [ -f "/etc/swift/proxy-server.conf" ]; then
13 exec /usr/bin/swift-init proxy-server start
14 else
15 exit 1
16 fi
17end script
18
19post-stop exec /usr/bin/swift-init proxy-server stop
20

Subscribers

People subscribed via source and target branches