mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 16:35:19 +00:00
add cron recipe to lando configs
This commit is contained in:
parent
ebdfd2abde
commit
3233c6fcb3
6 changed files with 26 additions and 9 deletions
|
@ -22,6 +22,14 @@ services:
|
|||
XDEBUG_SESSION_START: lando
|
||||
config:
|
||||
php: .vscode/php.ini
|
||||
build_as_root:
|
||||
- apt-get update -y
|
||||
- apt-get install cron -y
|
||||
- cp -f /app/.lando/cron-helper.sh /usr/local/bin/docker-php-entrypoint
|
||||
run_as_root:
|
||||
- service cron start
|
||||
run:
|
||||
- crontab /app/.lando/cron.txt
|
||||
proxy:
|
||||
mailservice:
|
||||
- mail.lndo.site
|
||||
|
|
11
.lando/cron-helper.sh
Normal file
11
.lando/cron-helper.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
service cron start
|
||||
|
||||
set -e
|
||||
|
||||
# first arg is `-f` or `--some-option`
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- apache2-foreground "$@"
|
||||
fi
|
||||
|
||||
exec "$@"
|
1
.lando/cron.txt
Normal file
1
.lando/cron.txt
Normal file
|
@ -0,0 +1 @@
|
|||
*/10 * * * * cd /app; /usr/local/bin/php Code/Daemon/Run.php Cron > /dev/null 2>&1
|
|
@ -243,9 +243,9 @@ class Channel
|
|||
/**
|
||||
* @brief Return the total number of channels on this site.
|
||||
*
|
||||
* No filtering is performed except to check PAGE_REMOVED.
|
||||
* No filtering is performed except to check channel_removed.
|
||||
*
|
||||
* @returns int|booleean
|
||||
* @returns int|bool
|
||||
* on error returns boolean false
|
||||
*/
|
||||
public static function channel_total()
|
||||
|
|
|
@ -296,7 +296,7 @@ class Libzot
|
|||
* @param array $channel => local channel structure of target recipient, required for "friending" operations
|
||||
* @param array $force (optional) default false
|
||||
*
|
||||
* @return boolean
|
||||
* @return bool
|
||||
* * \b true if successful
|
||||
* * otherwise \b false
|
||||
*/
|
||||
|
|
|
@ -30,15 +30,12 @@ class Channel
|
|||
|
||||
public function post()
|
||||
{
|
||||
|
||||
$channel = App::get_channel();
|
||||
|
||||
check_form_security_token_redirectOnErr('/settings', 'settings');
|
||||
|
||||
Hook::call('settings_post', $_POST);
|
||||
|
||||
$set_perms = '';
|
||||
|
||||
$role = ((x($_POST, 'permissions_role')) ? notags(trim($_POST['permissions_role'])) : '');
|
||||
$oldrole = get_pconfig(local_channel(), 'system', 'permissions_role');
|
||||
|
||||
|
@ -47,7 +44,7 @@ class Channel
|
|||
$role = $oldrole;
|
||||
}
|
||||
|
||||
if (($role != $oldrole) || ($role === 'custom')) {
|
||||
if (($role !== $oldrole) || ($role === 'custom')) {
|
||||
$this->change_permissions_role($channel, $role);
|
||||
}
|
||||
|
||||
|
@ -177,9 +174,9 @@ class Channel
|
|||
set_pconfig(local_channel(), 'system', 'noindex', $noindex);
|
||||
set_pconfig(local_channel(), 'system', 'preview_outbox', $preview_outbox);
|
||||
|
||||
|
||||
$r = q(
|
||||
"update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_friend_req = %d, channel_expire_days = %d $set_perms where channel_id = %d",
|
||||
"update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s',
|
||||
channel_notifyflags = %d, channel_max_friend_req = %d, channel_expire_days = %d where channel_id = %d",
|
||||
dbesc($username),
|
||||
intval($pageflags),
|
||||
dbesc($timezone),
|
||||
|
|
Loading…
Reference in a new issue