Questions tagged [startup-scripts]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
50 views

Can't run startup script on Debian VM in Google Cloud - SSH and Serial Console Access Issues

I've been struggling for days with a SSH access problem on my Compute Engine VM (Debian GNU/Linux 10), with an error in the sshd_config file leading to the inability to restart the SSH service: 2024-...
1 vote
1 answer
535 views

Stumped on why my Startup GPO Script isn't executing BCDEdit correctly

Environment: MS Server 2019 DC, Windows 10 Workstations joined to the Domain. The goal here is to set the Data Execution Prevention on a bunch of machines to OptOut. The way to do this via a command ...
0 votes
0 answers
167 views

GPO: Startup PowerShell script on multiple OUs only running once

I have a weird issue with a PS script which should run on startup of a computer. This script is configured identical on three levels (OUs) only different parameters. Depending on for which hosts it's ...
0 votes
0 answers
182 views

WMI Filter Does not Apply After Updates

I have a GPO with this WMI filter: SELECT Name From Win32_ServerFeature WHERE Name = 'Web Server (IIS)' The GPO has a startup script meant to modify a file to instruct the load balancer that the ...
74 votes
2 answers
69k views

Create a directory under /var/run at boot

I had a daemon that needed its own dir in /var/run for its PID file with write permission granted to the daemon's user. I found I could create this dir with these commands: # mkdir /var/run/mydaemon ...
3 votes
2 answers
3k views

View User's current logon script without domain admin rights

Is there a way to view which logon script is running for an AD user without having domain admin rights. I've tried gpresult and it isn't displaying any login/logoff scripts, but I believe the script ...
2 votes
2 answers
127 views

After Reboot of machine, startup script raise one server, but one stays down. When i manually start script both servers starts fine

#!/bin/bash ###BEGIN INIT INFO #chkconfig: 12345 98 13 #Provides: ACE #Required-Start: $local_fs #Required-Stop: $local_fs #Default-Start: 2 3 4 5 #Default-Stop: 0 1 6 #Short-...
0 votes
1 answer
650 views

Trying to start script but keep getting error syntax error near unexpected token `stop'

#!/bin/bash # case “$1” in start) echo -n “Starting Queue Manager” /opt/mqm/bin/strmqm QMPROD1 sleep 10 echo -n “Started Queue Manager” # ...
2 votes
5 answers
9k views

Ubuntu 9.10: how do I troubleshoot a startup script that doesn't appear to run?

I've created a bash script 'foo'. I've made that script executable with chmod+x and added it the the start-up by running sudo update-rc.d foo defaults 80 Despite that, it doesn't appear to be ...
0 votes
1 answer
821 views

GCE - Startup script - Can't use metadata anymore

Good evening, I've been trying to modify my Instance Startup script in Google Compute Engine, nevertheless with a new version of GCE (probably Dec 2021 or Nov 2021) the display has changed. Moveover ...
3 votes
4 answers
8k views

Is it possible to see output startup script in compute engine

My Compute Engine vm when deployed run a startup script. Everything seems working well, but there is one command in the startup script which I think it doesn't. I run the command apt-get update &...
0 votes
1 answer
2k views

Running Powershell scripts pushed from AD GPO as admin on domain computers

Needed some help getting a simple task done at work. I have about 30 machines in my work domain that i want to run a power-shell script on at startup. I have created a GPO that runs the script on all ...
0 votes
1 answer
2k views

running batch file as administrator privilege in clients with gpo(scripts/logon)

I want to run a batch file on all my domain clients via gpo(scripts/logon), but the problem is that to run a batch file, administrator privilege is required. I wanted to know is there any command or ...
0 votes
0 answers
435 views

GPO to detect if application is installed, if not install it and then create log file

@echo off IF NOT EXIST "C:\Program Files\APPLICATION_DIR" ( msiexec /q /i "https://www.SOME-WEBSITE.com/software/APPLICATION_NAME_x64.msi" LICENSE_KEY="LICENSE_KEY_GOES_HERE&...
1 vote
1 answer
451 views

Startup Script to Uninstall Google Chrome Not Working

I'm working with our sysadmin to uninstall Google Chrome on our network, which we manage via GPO. As it has been installed by the users themselves, by a GPO (which is now deleted) and manually by the ...
2 votes
4 answers
6k views

Run a script when joining a domain

I have a Microsoft domain (mostly 2008r2\7). I looking for a way to run a script immediately after (the restart after) joining a domain (without requiring user login), and so far I've failed. Also, I ...
1 vote
1 answer
3k views

Running script as user with root permissions

Due to conflicting and constantly changing permissions on mounted drives (which cannot easily be solved due to the development structure of programs), there is a script that must be run with root ...
1 vote
1 answer
166 views

Shutdown instance in startup script takes long time

I've added a bash script in instance metadata which performs some tests and then runs the following command at the end of the script. shutdown -h now The instance and image is after removed, by the &...
2 votes
0 answers
1k views

ActiveDirectory Startup/Shutdown PowerShell Script not being executed, failing silently

Environment Windows Server 2012 domain Windows 10 version 2004 client I'm trying to deploy an ActiveDirectory Startup or Shutdown powershell script on a test OU to update VLC Media Player and I can'...
0 votes
1 answer
292 views

GPO Script - Logging/Tracking user acceptance - Windows Workstations

I am a developer with no prior experience with GPO scripting. I have a request to create a user acceptance policy that is logged when user accept it. (about 1000 Windows workstations in an AD domain) ...
5 votes
2 answers
6k views

How to change rc.d startup order in FreeBSD?

My question exactly same as this question except I want to change services in FreeBSD. I made some research and I found rcorder command which gives full order of services with below paramaters. ...
0 votes
1 answer
237 views

Execute a script while boot up in RHEL7, not working

I have created below script in RHEL 7.6, but unfortunately getting EXEC format error. When i execute the command from working directory it's working fine. below is the service file which was created ...
3 votes
3 answers
5k views

Run unison in background on startup?

I'm running Debian 6 64bit. What I'm trying to do is run Unison on startup to constantly monitor files on the LAMP server I have running on my VM and sync that with the VM Shared folder. while true ...
9 votes
4 answers
45k views

How can I set environment variables when I ssh login to my Unix box by passing custom arguments?

I want to pass some parameters as part of my ssh connection that I can use to set custom variables for my login to do certain things or run certain scripts. How do you do this running Putty on Windows ...
3 votes
3 answers
10k views

Showing the IP in the banner before login

I have a Linux machine and I want it to show the current IP in the banner that shows before the login prompt is displayed. How can I do that? I considered making a startup script that finds the IP in ...
-2 votes
2 answers
883 views

trigger a autologon from computer startup script

I am looking for a way, to automatically logon a User from computer startup script, without rebooting the machine. I know, I can write in HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon... ...
0 votes
1 answer
1k views

Error running a startup-script: home environment variable not set in redhat instance running on GCP

I'm having trouble to understand the shell environement that is used to run startup scripts. What difference with a login session? If I set a simple starup script to print the env variables: ...
1 vote
0 answers
624 views

MongoDB rc.d script for FreeBSD

I want to start MongoDB (aka mondgod) as a service under FreeBSD. I have the following in rc.conf: mongod_enable="YES" mongod_config="/usr/local/etc/mongodb.conf" mongod_dpath="/var/db/mongod" But ...
0 votes
0 answers
359 views

Is it possible to get systemd to monitor a process that it does not start?

Some of our startup scripts have an ExecStart line that runs a curl command to start jobs from our Jenkins build server. Systemd does not know anything about the job that is started as a result of ...
0 votes
1 answer
949 views

System Account Access to Domain Share

Good morning. I'm trying to create a PowerShell startup script via Group Policy. I set the group policy and directed it to the location of the script. \ \server\c$\share\script.ps1 After applying ...
7 votes
1 answer
4k views

postgres not starting after reboot on ubuntu

I'm not familiar with ubuntu (raring), so could someone help me please: I'm using postgresql 9.1 from apt. It installed the appropriate init script in /etc/init.d/postgresql. I can start the server ...
1 vote
2 answers
5k views

init script for zookeeper

i have seen that the developers of zookeeper have a great zkServer.sh script to start,stop, restart etc zookeeper, but i have no idea why in the world they decided to skip init script to use. With ...
1 vote
0 answers
383 views

Server 2008R2, startup/shutdown powershell scripts in gpedit.msc not working and not appearing in registry. Script works manually. No domain involved

It's a fully updated 2008 R2 box running WMF 5.1. I've got a powershell script that, under normal circumstances, e-mails me on startup or shutdown. It's working fine on a different 2008 R2 box. On ...
0 votes
0 answers
97 views

running scripts that have sudo in it as sudo at startup?

I have a script that I want to run on startup. This script launches vms using sudo VBoxManage. How can I a) Execute this vm start script on the computer startup and b) make sure the sudos don't need ...
5 votes
1 answer
4k views

How to allow for a slow-starting dependency service in systemd

Sometimes a service will start and fork - giving systemd the illusion that it's ready - even though it hasn't finished "warming up". In this particular instance I'm using ApacheDS to provide LDAP ...
0 votes
1 answer
686 views

GCE Ubuntu Multi-Interface Instance Route Configuration

I'm running an Ubuntu 16.04 instance with multiple interfaces. I'm looking to configure some routes on the 2nd interface. While I can do this manually, that does not persist with a reboot. Most ...
0 votes
3 answers
8k views

Unable to start a script at startup ubuntu

I am trying to execute one script at startup on ubuntu 16.04 LTS desktop. I have added my script to /etc/init.d location. But after restart I am unable to see my script running using pidof -s pgd ...
0 votes
1 answer
323 views

Right network interface autodetect and get dhcp while boot

While preparing the mini forensic system I hung on a problem: Let us imagine, we prepare a usb-flash booted linux for lot of diferent workstations. While setting up the network (ipv4 dhcp) we can find ...
1 vote
2 answers
1k views

Crontab vs init.d which one to use for Startup Script?

I have a script that start my docker service and starts my container on RHEL7.3 machine when system reboots. Two ways are working for me: 1) Add script to rc.local 2) Add to crontab -e with path to ...
0 votes
1 answer
2k views

Windows 10 Hibernate Boot let's suspend (Powershell) Script execution at Startup

I am intensively working with Powershell Scripts which are executed at startup (local machine, not logon). I had some problems to troubleshoot like "Wait for network" or replication failures between ...
0 votes
1 answer
51 views

Debain Start Up Script - Google Cloud

so I would like to know how to create a script the performs three basic commands. sudo su - Admin cd ~/AMP ./ampinstmgr -a This is what I got, I have also given it 777 perms. #! /bin/sh ...
0 votes
4 answers
8k views

Running a bash script as root on boot

i have a script that calculate an ip address (using gateway address) than change, the script work when i launch it manually with sudo sudo ./changework.sh i want this script to run during bootup ...
1 vote
0 answers
1k views

Clamav TCP 3310 setup Debian

I've run into this problem which is weird. I'm using Debian jessie I have setup clamav to listen also on port 3310 with the TCPSocket 3310 option. After saving the changes to the config file I ...
0 votes
3 answers
3k views

Chroot on startup

I have a script that runs on startup, but it wont launch a application in chroot. #!/bin/sh /usr/sbin/chroot /root/chrootdir/ /bin/sh -c "lighttpd -f /etc/lighttpd.conf -m /lib" echo "script ...
0 votes
1 answer
399 views

Ubuntu-Server Does Not Present Logon After Executing rc.local Script

UPDATE: I completely commented out the rc.local script and the problem still persists. This time though, it seems like the boot process has made it further than before. It's still getting hung though. ...
2 votes
3 answers
4k views

How do I start Jetbrains License Server automatically on my Ubuntu system?

Assuming I have my license server installed here: /opt/jetbrains-license-server, how do I configure it to start automatically?
1 vote
3 answers
11k views

Filtering GPO's Based on Computer Account Security Group

So, I have a GPO, which runs a quick start up script to delete locally installed IP printers from all machines on our AD domain during computer start up. This works great...the issue appears when we ...
0 votes
2 answers
353 views

How to start java application on boot

I have a server with Centos 6. I've installed an configured everything so my server application runs smoothly, however if there is any unexpected reboots I have to manually start an SSH session and ...
1 vote
1 answer
2k views

Reconnect Windows Network Drive after network connection has been established

User uses a piece of software (simple database and front end app) that connects to a database stored on another workstation, by way of mapped drive. This mode of access is supported by the software ...
1 vote
0 answers
31 views

Start script are not cleared table of processes

I have a proxy server, all ok. But, i have some problems & questions. First: when i make "/etc/init.d/nginx stop" or "/etc/init.d/nginx restart", of my config, it not reload and all nginx process ...