~qpfiffer/wheypi

92aa91b3790753afc84eb2c38508572aba646567 — Quinlan Pfiffer a month ago 3362d54 master v0.1
Update chdir destination.
2 files changed, 10 insertions(+), 1 deletions(-)

M src/main.c
M wheypi.init
M src/main.c => src/main.c +9 -0
@@ 66,6 66,15 @@ int main(int argc, char *argv[]) {
				m38_log_msg(LOG_ERR, "Not enough arguments to -s.");
				return -1;
			}
		} else if (strncmp(cur_arg, "-c", strlen("-c")) == 0) {
			if ((i + 1) < argc) {
				const char *chdir_dest = argv[++i];
				m38_log_msg(LOG_INFO, "Changing directory to %s", chdir_dest);
				chdir(chdir_dest);
			} else {
				m38_log_msg(LOG_ERR, "Not enough arguments to -c.");
				return -1;
			}
		}
	}


M wheypi.init => wheypi.init +1 -1
@@ 1,6 1,6 @@
#!/sbin/openrc-run
command="/usr/local/sbin/wheypi"
command_args="-s /srv/wheypi"
command_args="-c /srv/wheypi -s CHANGE_ME_SALT"
supervisor="supervise-daemon"

depend() {