update
This commit is contained in:
parent
4aa8111f98
commit
c72fb8b625
46 changed files with 361 additions and 47 deletions
|
@ -14,4 +14,9 @@ apt-get update
|
|||
|
||||
apt-get install -y moodle
|
||||
|
||||
systemctl enable --now moodle-cron@1
|
||||
systemctl enable --now moodle-cron@2
|
||||
systemctl enable --now moodle-adhoc_task@.service@1
|
||||
systemctl enable --now moodle-adhoc_task@.service@2
|
||||
|
||||
```
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
VERSION=4.3.0
|
||||
APP=moodle
|
||||
DEPOT=git://git.moodle.org/moodle.git
|
||||
GIT_VERSION=v$VERSION
|
||||
GIT_VERSION=MOODLE_403_STABLE
|
||||
DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M)
|
||||
DEBIAN_VERSION_CODENAME=bookworm
|
||||
IMAGE_SIZE=2
|
||||
|
@ -24,8 +24,14 @@ build(){
|
|||
makedeb(){
|
||||
PATH_DEB=/tmp/src/rootfs
|
||||
|
||||
mv /tmp/${APP} ${PATH_DEB_INSTALL}/usr/share/
|
||||
|
||||
mkdir -p ${PATH_DEB}/usr/share/
|
||||
mv /tmp/${APP} ${PATH_DEB}/usr/share/
|
||||
|
||||
mkdir -p ${PATH_DEB}/etc/moodle/
|
||||
mv ${PATH_DEB}/usr/share/moodle/config-dist.php ${PATH_DEB}/etc/moodle/config.php
|
||||
sed -i "s/__DIR__/'\/usr\/share\/moodle'/" ${PATH_DEB}/etc/moodle/config.php
|
||||
ln -s /etc/moodle/config.php ${PATH_DEB}/usr/share/moodle/config.php
|
||||
|
||||
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
||||
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
||||
}
|
||||
|
|
1
ressources/moodle/rootfs/DEBIAN/conffiles
Normal file
1
ressources/moodle/rootfs/DEBIAN/conffiles
Normal file
|
@ -0,0 +1 @@
|
|||
/etc/moodle/config.php
|
|
@ -0,0 +1,17 @@
|
|||
[Unit]
|
||||
Description=moodle adhoc task
|
||||
StartLimitIntervalSec=120
|
||||
StartLimitBurst=10
|
||||
|
||||
[Service]
|
||||
user=www-data
|
||||
group=www-data
|
||||
|
||||
Restart=on-failure
|
||||
RestartSec=60s
|
||||
StandardOutput=null
|
||||
Restart=always
|
||||
ExecStart=/usr/bin/php /usr/share/moodle/admin/cli/adhoc_task.php -e -k=3600
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1,18 @@
|
|||
[Unit]
|
||||
Description=moodle cron task
|
||||
StartLimitIntervalSec=120
|
||||
StartLimitBurst=10
|
||||
|
||||
[Service]
|
||||
User=www-data
|
||||
Group=www-data
|
||||
|
||||
Restart=on-failure
|
||||
RestartSec=60s
|
||||
|
||||
StandardOutput=null
|
||||
Restart=always
|
||||
ExecStart=/usr/bin/php /usr/share/moodle/admin/cli/cron.php
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Add table
Add a link
Reference in a new issue