From 93d0c87b30c4860fc14155df24252541251a35a8 Mon Sep 17 00:00:00 2001 From: Brett Date: Wed, 1 May 2024 20:11:38 -0400 Subject: [PATCH] fix parser --- create_systemd_service.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 create_systemd_service.py diff --git a/create_systemd_service.py b/create_systemd_service.py old mode 100644 new mode 100755 index 157cf7a..f6dfd03 --- a/create_systemd_service.py +++ b/create_systemd_service.py @@ -13,7 +13,8 @@ parser.add_argument("-w", "--wanted", default="multi-user.target") parser.add_argument("-d", "--working_dir", default=None) parser.add_argument("-u", "--user", default=None) parser.add_argument('-g', "--group", default=None) -parser.add_argument("service_name", required=("--install" in sys.argv or "-i" in sys.argv), default=None) +if "--install" in sys.argv or "-i" in sys.argv: + parser.add_argument("service_name", default=None) args = parser.parse_args()