Pre-Test Push
This commit is contained in:
parent
84133c9315
commit
81689667e2
@ -11,7 +11,7 @@ declare -a crontab_dirs=(
|
|||||||
)
|
)
|
||||||
declare -a crontabs_in_db
|
declare -a crontabs_in_db
|
||||||
|
|
||||||
sqlite_cmd="sqlite3 $WEBCRON_DB"
|
sqlite_cmd="sqlite3 webcron.db"
|
||||||
|
|
||||||
|
|
||||||
for name in $( $sqlite_cmd <<< "SELECT crontab_path FROM crontabs;"); do
|
for name in $( $sqlite_cmd <<< "SELECT crontab_path FROM crontabs;"); do
|
||||||
@ -30,7 +30,7 @@ for dir in ${crontab_dirs[@]}; do
|
|||||||
$sqlite_cmd "
|
$sqlite_cmd "
|
||||||
INSERT INTO crontabs (crontab_path, crontab_data) VALUES
|
INSERT INTO crontabs (crontab_path, crontab_data) VALUES
|
||||||
('$file',
|
('$file',
|
||||||
'$($"$(<$file)")');
|
'$(cat $file)');
|
||||||
" # (2023-05-15)
|
" # (2023-05-15)
|
||||||
# Had to add the $"..." to the statement above because the script was attempting to load
|
# Had to add the $"..." to the statement above because the script was attempting to load
|
||||||
# and execute the script on trying to load it into the db
|
# and execute the script on trying to load it into the db
|
||||||
@ -51,7 +51,7 @@ while read crontab_id crontab_path; do
|
|||||||
# loaded into the db.
|
# loaded into the db.
|
||||||
if [[ -f "$crontab_path" ]] && [[ ! "$data" == "$(<$crontab_path)" ]]; then
|
if [[ -f "$crontab_path" ]] && [[ ! "$data" == "$(<$crontab_path)" ]]; then
|
||||||
sqlite3 $WEBCRON_DB "
|
sqlite3 $WEBCRON_DB "
|
||||||
UPDATE crontabs SET crontab_data = '$($"(<$crontab_path)")' WHERE crontab_id = $crontab_id
|
UPDATE crontabs SET crontab_data = '$(<$crontab_path)' WHERE crontab_id = $crontab_id
|
||||||
" # (2023-05-15)
|
" # (2023-05-15)
|
||||||
# Had to add the $"..." to the statement above because the script was attempting to load
|
# Had to add the $"..." to the statement above because the script was attempting to load
|
||||||
# and execute the script on trying to load it into the db
|
# and execute the script on trying to load it into the db
|
||||||
|
2
Site
2
Site
@ -1 +1 @@
|
|||||||
Subproject commit dbc5587bb686dfdadccd5baa315535317e91a595
|
Subproject commit b8ba9dc5d46ebc968820ec10d30809323caa0806
|
13
test.php
Executable file
13
test.php
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/php
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require('Site/Libraries/table/class.php');
|
||||||
|
|
||||||
|
$table = new Table("crontabs");
|
||||||
|
$db = new SQLite3("webcron.db");
|
||||||
|
|
||||||
|
$table->Load($db, "");
|
||||||
|
|
||||||
|
echo $table->get_html();
|
||||||
|
?>
|
0
webcrond.db
Normal file
0
webcrond.db
Normal file
Loading…
Reference in New Issue
Block a user