debian/init.d: add migration support
This commit is contained in:
parent
8e6affddd9
commit
c949bc10b8
|
@ -111,8 +111,15 @@ do_reload() {
|
|||
return 0
|
||||
}
|
||||
|
||||
do_migrate() {
|
||||
log_action_msg "Applying new migrations .."
|
||||
su $USER -p -c "/usr/bin/compte-agglo-montpellier syncdb --migrate --noinput"
|
||||
log_action_msg ".. done"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
do_migrate
|
||||
log_daemon_msg "Starting $DESC " "$NAME"
|
||||
do_start
|
||||
case "$?" in
|
||||
|
@ -147,6 +154,7 @@ case "$1" in
|
|||
#
|
||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
do_migrate
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
|
|
Reference in New Issue