I have these two services, one is Google start up script service and second one is redis service, I want to start redis service once the startup script service is started and done, I have these following systemd config but my redis services won't start with these config
google-startup-scripts.service
[Unit]
Description=Google Compute Engine Startup Scripts
After=network-online.target network.target rsyslog.service
After=google-instance-setup.service google-network-daemon.service
After=cloud-final.service multi-user.target
Wants=cloud-final.service
After=snapd.seeded.service
Wants=snapd.seeded.service
[Service]
RemainAfterExit=yes
ExecStart=/usr/bin/google_metadata_script_runner --script-type startup
KillMode=process
Type=oneshot
StandardOutput=journal+console
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
[Install]
WantedBy=multi-user.target
redis.service
[Unit]
Description=Redis In-Memory Data Store
After=google-startup-scripts.service
[Service]
Type=notify
PIDFile=/run/redis-6378.pid
ExecStart=/usr/bin/redis-getdevice /etc/redis-getdevice/6378.conf
ExecStop=/usr/bin/redis-cli -p 6378 shutdown
Restart=always
[Install]
WantedBy=multi-user.target
once the google-startup-script.service run and it do the operations and goes to state exited. and redis service doesn't start at all (I'm using After
in unit) what I'm doing wrong here