From owner-freebsd-questions@freebsd.org Fri Apr 10 12:39:08 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0F8852BCE9C for ; Fri, 10 Apr 2020 12:39:08 +0000 (UTC) (envelope-from jerry@seibercom.net) Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48zHd711Wnz40yd for ; Fri, 10 Apr 2020 12:39:06 +0000 (UTC) (envelope-from jerry@seibercom.net) Received: by mail-qt1-x829.google.com with SMTP id s30so1316192qth.2 for ; Fri, 10 Apr 2020 05:39:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seibercom.net; s=google; h=date:from:to:subject:message-id:in-reply-to:references:reply-to :organization:mime-version; bh=Z4WIB5Uc6OTM5mNnxuxk8ssv3zGwcAoa2f06Jy+2k6U=; b=d422fZAkDMU4SpGDHsaUPI3py1oUOW6cXNfDH0HS4ij0o9DjN1vQv9gwXnUE01teXt sgue+S4uHlLip8/SM6BOao7RJJvitseD96HdUyjQLrprzahRYOKHDy1t8/VZhUGWOXfF ibpuDvI0dA4HNyEi1Cy1QIntyK8a/lg0IAijQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:reply-to:organization:mime-version; bh=Z4WIB5Uc6OTM5mNnxuxk8ssv3zGwcAoa2f06Jy+2k6U=; b=CsAeyXpYD7KatRG8K00FPxCw5BkzYaUjSOYk+HBr+WlK1ikYSIKQVnZnhQgUBLHbDU +6vjKR6DzXcdzXuO1w8yYOtgNADBi8e9pmCwEGFU34drOJggaAVwVXoYjrvv425fF5bY 4DLnC4d7pl1GBBP9sPgnhj8GlSCGyG5LdgXSmingfOjJ88YqjtsEJJDSx9FHJ//gC1mB F/dDL0Ydp6pcVAZ3l3Ffzp+yWumOxxgZSfLiMbk59ORQw2LKe0hS8hrSPd9ZOvPQfJe2 BE4Uz95fD2LcMKitoxnawT+XBeJW8tCufa1SsIf+l6itbmxJG6wDfCSDBA4Cggys8rPe GnbQ== X-Gm-Message-State: AGi0PuZ5djWnyc5Vm/F4SWrjb7cOCEYfduZRk1GGfBlxxnJ0wPz4KoEF kumQ/5zj1ti/A+JrXbcuiy8L3ro1Zw8= X-Google-Smtp-Source: APiQypLri23ECWEpGHRSLMbJ5BQxaYULmNZMrANaou2CzZpXDYc5j7UdrPzpI0twwEa4wMnijDYnBA== X-Received: by 2002:aed:2964:: with SMTP id s91mr4174513qtd.200.1586522345126; Fri, 10 Apr 2020 05:39:05 -0700 (PDT) Received: from scorpio.seibercom.net (cpe-174-109-225-250.nc.res.rr.com. [174.109.225.250]) by smtp.gmail.com with ESMTPSA id o16sm1450792qki.110.2020.04.10.05.39.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Apr 2020 05:39:04 -0700 (PDT) Received: from localhost (HP-ENVY [192.168.0.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: jerry@seibercom.net) by scorpio.seibercom.net (Postfix) with ESMTPSA id 48zHd31fQ2z6B5h for ; Fri, 10 Apr 2020 08:39:03 -0400 (EDT) Date: Fri, 10 Apr 2020 08:38:54 -0400 From: Jerry To: freebsd-questions@freebsd.org Subject: Re: Cron config for ipfw table Message-ID: <20200410083854.0000516d@seibercom.net> In-Reply-To: References: Reply-To: freebsd-questions@freebsd.org Organization: seibercom.net X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/682.zK2ad6TRL1P_.gKHmz+"; protocol="application/pgp-signature" X-Rspamd-Queue-Id: 48zHd711Wnz40yd X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=seibercom.net header.s=google header.b=d422fZAk; dmarc=none; spf=pass (mx1.freebsd.org: domain of jerry@seibercom.net designates 2607:f8b0:4864:20::829 as permitted sender) smtp.mailfrom=jerry@seibercom.net X-Spamd-Result: default: False [-1.61 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd-questions@freebsd.org]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; TO_DN_NONE(0.00)[]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[seibercom.net:+]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(-2.01)[ip: (-9.27), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.43), country: US(-0.05)]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RECEIVED_SPAMHAUS_PBL(0.00)[250.225.109.174.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; REPLYTO_EQ_TO_ADDR(5.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[seibercom.net:s=google]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; DMARC_NA(0.00)[seibercom.net]; RCPT_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[9.2.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2020 12:39:08 -0000 --Sig_/682.zK2ad6TRL1P_.gKHmz+ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, 10 Apr 2020 13:51:51 +0200, Jos Chrispijn commented: >I have added a line to my crontab that defines running a script on >reboot: > >@reboot bash /root/cronjobs/reboot.sh & > >This (bash) .sh script should add an updated ipfw table (preventing I=20 >have to run his action manually) but unfortunately no script is >executed on reboot. > >- script is executable >- no action is mentioned in /var/log/cron > >Can you tell me what I do wrong here? Perhaps scheduling this action=20 >_after_ reboot would be the solution? I run several programs upon reboot also. However, I never use "bash" as part of the command. Assuming you have the correct "shebang" in th script, you could just use @reboot /root/cronjobs/reboot.sh & However, I am not sure you need the "&". All cron jobs are run in the background. You might check out this URL: https://help.ubuntu.com/community/CronHowto I would make sure you have the right 'shebang' in the script then remove both 'bash' and the '&' from the command line and see what transpires. You could also experiment with adding "&> /dev/null" sans the quotation marks to the end of the command. By the way, you did make sure that the script is executable, I assume. --=20 Jerry --Sig_/682.zK2ad6TRL1P_.gKHmz+ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEIQb/tTwl6I1ueEVtOHMGOIfexWQFAl6QaN4ACgkQOHMGOIfe xWQC0AgAuC6Kds24LbUUAKcMCb9JsXWzHnsiehVS2f+1mhy2s3xZZ2o7I18/3bw7 SqrOMGel369dwGuTekPPpWzFRsOcxYxiPx1rFsTmXYeNoBuHRcfUFkVTCLmjkK3O DoTLME0V6rxzr2BMFjii7P+K2vbJp4ozo9NTGf5fqlI5qmLJz0ipyEX8AN6CvkvN yaPWrEdJwiyU03RXqzTNszUs7fXiYYPXM6i/P0jo5tKQfHRgRVnZhqUTBVRIm46a wU/fmBpaQL7MhwOqkM92dJ51BaFUHjP9TPYKvTZKXFIQoc2a2VHuncDDba/6J9m8 Zz+zPqiIKtfx1g146wu4lTrL0D9Iqw== =dP2R -----END PGP SIGNATURE----- --Sig_/682.zK2ad6TRL1P_.gKHmz+--