💾 Archived View for gmi.noulin.net › gitRepositories › nonstop › file › nonstop.c.gmi captured on 2023-01-29 at 13:16:30. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
nonstop.c (581B)
1 #! /usr/bin/env sheepy 2 /* or direct path to sheepy: #! /usr/local/bin/sheepy */ 3 4 #include "libsheepyObject.h" 5 #include <unistd.h> 6 7 int argc; char **argv; 8 9 int main(int ARGC, char** ARGV) { 10 11 argc = ARGC; argv = ARGV; 12 13 initLibsheepy(argv[0]); 14 setLogMode(LOG_VERBOSE); 15 16 if (argc < 2) { 17 puts(BLD RED "Command argument missing" RST); 18 XFAILURE; 19 } 20 21 forever { 22 logI(BLD GRN "------- NONSTOP START ------------" RST); 23 system(argv[1]); 24 logI(BLD YLW "------- NONSTOP COMMAND END ------" RST); 25 logI("sleeping 5s - press ctrl-c to exit"); 26 sleep(5); 27 } 28 }