|
@@ -13,7 +13,7 @@
|
13
|
13
|
# License
|
14
|
14
|
# =======
|
15
|
15
|
#
|
16
|
|
-# Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
|
|
16
|
+# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
|
17
|
17
|
#
|
18
|
18
|
# This program is free software: you can redistribute it and/or modify
|
19
|
19
|
# it under the terms of the GNU Affero General Public License as published by
|
|
@@ -279,6 +279,12 @@ function restore_local_gogs {
|
279
|
279
|
rm -rf ${temp_restore_dir}ssh
|
280
|
280
|
chown -R ${GOGS_USERNAME}:${GOGS_USERNAME} /home/${GOGS_USERNAME}
|
281
|
281
|
fi
|
|
282
|
+
|
|
283
|
+ GOGS_CONFIG_PATH=/home/${GOGS_USERNAME}/custom/conf
|
|
284
|
+ GOGS_CONFIG_FILE=${GOGS_CONFIG_PATH}/app.ini
|
|
285
|
+ MARIADB_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb)
|
|
286
|
+ sed -i "s|PASSWD =.*|PASSWD = $MARIADB_PASSWORD|g" ${GOGS_CONFIG_FILE}
|
|
287
|
+ MARIADB_PASSWORD=
|
282
|
288
|
fi
|
283
|
289
|
}
|
284
|
290
|
|
|
@@ -349,6 +355,12 @@ function restore_remote_gogs {
|
349
|
355
|
chown -R ${GOGS_USERNAME}:${GOGS_USERNAME} /home/${GOGS_USERNAME}
|
350
|
356
|
echo $"Restore of Gogs complete"
|
351
|
357
|
fi
|
|
358
|
+
|
|
359
|
+ GOGS_CONFIG_PATH=/home/${GOGS_USERNAME}/custom/conf
|
|
360
|
+ GOGS_CONFIG_FILE=${GOGS_CONFIG_PATH}/app.ini
|
|
361
|
+ MARIADB_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb)
|
|
362
|
+ sed -i "s|PASSWD =.*|PASSWD = $MARIADB_PASSWORD|g" ${GOGS_CONFIG_FILE}
|
|
363
|
+ MARIADB_PASSWORD=
|
352
|
364
|
fi
|
353
|
365
|
}
|
354
|
366
|
|