+int supervisor_run(int argc, char **argv) {
+supervisor_start:
+ if(file_exists("/opt/dev/deploy/.env")) {
+ FILE * fp;
+ char * line = 0;
+ size_t len = 0;
+ ssize_t read;
+
+ fp = fopen("/opt/dev/deploy/.env", "r");
+ if(fp) {
+ log_add_verbose(1, "[supervisor] found /opt/dev/deploy/.env\n");
+
+ while ((read = getline(&line, &len, fp)) != -1) {
+ if(line[strlen(line) - 1] == '\n') {
+ line[strlen(line) - 1] = 0;
+ }
+
+ log_add_verbose(1, "[supervisor] adding .env var: %s\n", line);
+ putenv(strdup(line));
+ }
+
+ fclose(fp);
+ free(line);
+ }
+ }
+
+ supervisor_got_signal_reload = 0;
+ supervisor_got_signal_stop = 0;
+