Skip to content

Commit

Permalink
rename deploy_upstart_scripts to install_upstart.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
knorth55 committed Nov 18, 2020
1 parent 349327e commit f7d71de
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 61 deletions.
15 changes: 0 additions & 15 deletions jsk_fetch_robot/jsk_fetch_startup/config/deploy_upstart_scripts.sh

This file was deleted.

54 changes: 8 additions & 46 deletions jsk_fetch_robot/jsk_fetch_startup/config/install_upstart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,49 +5,11 @@ jsk_fetch_startup=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`"/.. > /dev/null &&
IFS=':' read -r -a prefix_paths <<< "$CMAKE_PREFIX_PATH"
current_prefix_path="${prefix_paths[0]}"

# jsk-fetch-startup
sudo bash -c "echo \"description \\\"spawn jsk bringup nodes for fetch\\\"
# use default log dir: yamaguchi & s-kitagawa (2019/04/18)
# env ROS_LOG_DIR=/var/log/ros
start on roscore_is_up
stop on roscore_is_down
respawn
# add ROSCONSOLE_FORMAT: s-kitagawa (2019/10/03)
env AUDIO_DEVICE=\\\"alsa_output.usb-1130_USB_AUDIO-00-AUDIO.analog-stereo\\\"
env ROSCONSOLE_FORMAT=\\\"[\\\${severity}] [\\\${time}] [\\\${node}:\\\${logger}]: \\\${message}\\\"
# enable usb speaker if available
pre-start script
# launch by fetch user: yamaguchi & s-kitagawa (2019/04/18)
# exec su ros -c \\\"pactl set-default-sink \\\$AUDIO_DEVICE || true\\\"
exec su fetch -c \\\"pactl set-default-sink \\\$AUDIO_DEVICE || true\\\"
end script
script
# launch by fetch user: yamaguchi & s-kitagawa (2019/04/18)
# exec su ros -c \\\". ${current_prefix_path}/setup.bash && roslaunch ${jsk_fetch_startup}/launch/fetch_bringup.launch boot_sound:=true\\\"
exec su fetch -c \\\". ${current_prefix_path}/setup.bash && roslaunch ${jsk_fetch_startup}/launch/fetch_bringup.launch boot_sound:=true\\\"
end script\" > /etc/init/jsk-fetch-startup.conf"
echo "== cat /etc/init/jsk-fetch-startup.conf =="
cat /etc/init/jsk-fetch-startup.conf
echo "== usage: sudo service jsk-fetch-startup restart =="

# vertical-touchscreen
sudo bash -c "echo \"# See https://askubuntu.com/questions/507496/how-to-start-gui-application-with-upstart
description \\\"Use vertical touchscreen\\\"
start on runlevel [2345]
stop on runlevel [016]
script
sleep 30 # Wait for X programs to start
export DISPLAY=:0
exec su fetch -c \\\". ${current_prefix_path}/setup.bash && ${jsk_fetch_startup}/scripts/vertical-touchscreen.sh\\\"
end script\" > /etc/init/vertical-touchscreen.conf"
echo
echo "== cat /etc/init/vertical-touchscreen.conf =="
cat /etc/init/vertical-touchscreen.conf
echo "== usage: sudo service vertical-touchscreen restart =="
#
cd $jsk_fetch_startup/upstart_scripts
for file in $(ls ./*.conf); do
sudo cp $file /etc/init/
sudo chown root:root /etc/init/$file
sudo chmod 644 /etc/init/$file
echo "copied $file to /etc/init"
done

0 comments on commit f7d71de

Please sign in to comment.